#!/usr/bin/env bb
;; Run all unit tests for lazygitclj

(require '[clojure.test :as t])

;; Add test path
(require '[babashka.classpath :refer [add-classpath]])
(add-classpath "test")

;; Load test namespaces
(require 'lazygitclj.core-test)

(println "")
(println "Running lazygitclj unit tests...")
(println "================================")

(let [summary (t/run-tests 'lazygitclj.core-test)]
  (println "")
  (println "================================")
  (when (or (pos? (:fail summary))
            (pos? (:error summary)))
    (System/exit 1)))
