简体   繁体   中英

Clojure Leiningen test FAILs not shown in error summary

When running lein test on my current Clojure project, I got two test failures but the summary stated that I got 0 failures. See output snippet below:

$ lein test
FAIL in clojure.lang.PersistentList$EmptyList@1 (config.clj:53)
expected: (= (some-fn some-input) (expected-output))
  actual: (not (= (actual-output) (expected-output)))

FAIL in clojure.lang.PersistentList$EmptyList@1 (config.clj:53)
expected: (= (some-fn some-other-input) (other-expected-output))
  actual: (not (= (other-actual-output) (other-expected-output)))

lein test project.test.config

lein test project.test.other-module

lein test project test.another-module

lein test project test.one-more

Ran 8 tests containing 71 assertions.
0 failures, 0 errors.

Note the FAIL lines and the last line. Previously tests have worked in this project, but I am unable to isolate what code changes might have affected this incorrect behavior from lein test .

Has anyone seen this before and know what might cause it to occur?

I discovered the problem shortly after posting this but am leaving the question here for others. I accidentally put my test within a def instead of a deftest .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM