[#914] Fix failing test
This commit is contained in:
parent
2dd18e7cc6
commit
277029caae
3 changed files with 8 additions and 7 deletions
2
deps.clj
2
deps.clj
|
|
@ -1 +1 @@
|
||||||
Subproject commit e25d6f6498cfed9474ec44d568f7131d2aa0cc63
|
Subproject commit d85b9aac2fe750ec75fd611842ddf055b64bb933
|
||||||
|
|
@ -57,7 +57,7 @@ true
|
||||||
"))))
|
"))))
|
||||||
(is (true? (bb "
|
(is (true? (bb "
|
||||||
(= 5 (:exit @(babashka.deps/clojure [] {:in \"(System/exit 5)\" :out :string})))")))
|
(= 5 (:exit @(babashka.deps/clojure [] {:in \"(System/exit 5)\" :out :string})))")))
|
||||||
#_(testing "start from other directory"
|
(testing "start from other directory"
|
||||||
(is (= {1 {:id 1}, 2 {:id 2}}
|
(is (= {1 {:id 1}, 2 {:id 2}}
|
||||||
(edn/read-string (bb "
|
(edn/read-string (bb "
|
||||||
(:out @(babashka.deps/clojure [\"-M\" \"-e\" \"(require 'medley.core) (medley.core/index-by :id [{:id 1} {:id 2}])\"] {:out :string :dir \"test-resources/clojure-dir-test\"}))"))))))
|
(:out @(babashka.deps/clojure [\"-M\" \"-e\" \"(require 'medley.core) (medley.core/index-by :id [{:id 1} {:id 2}])\"] {:out :string :dir \"test-resources/clojure-dir-test\"}))"))))))
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,12 @@
|
||||||
(println))
|
(println))
|
||||||
|
|
||||||
(defmethod clojure.test/report :end-test-var [_m]
|
(defmethod clojure.test/report :end-test-var [_m]
|
||||||
(let [{:keys [:fail :error]} @*report-counters*]
|
(when-let [rc *report-counters*]
|
||||||
|
(let [{:keys [:fail :error]} @rc]
|
||||||
(when (and (= "true" (System/getenv "BABASHKA_FAIL_FAST"))
|
(when (and (= "true" (System/getenv "BABASHKA_FAIL_FAST"))
|
||||||
(or (pos? fail) (pos? error)))
|
(or (pos? fail) (pos? error)))
|
||||||
(println "=== Failing fast")
|
(println "=== Failing fast")
|
||||||
(System/exit 1))))
|
(System/exit 1)))))
|
||||||
|
|
||||||
(defn bb-jvm [input-or-opts & args]
|
(defn bb-jvm [input-or-opts & args]
|
||||||
(reset! cp/cp-state nil)
|
(reset! cp/cp-state nil)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue