weavejester / eftest

Fast and pretty Clojure test runner
425 stars 40 forks source link

Add :fail-fast? option #26

Closed Deraen closed 7 years ago

Deraen commented 7 years ago

Closes #1

Not sure if approach with each fixtures here is correct, but this seems to work. If I added the test to existing test-var fn, the fixtures were run for all test vars after failure. Now that I moved each-fixtures call to inside the check, no more fixtures are run after a failure.

I tested this with following fixture:

(def c (atom 0))

(use-fixtures :each (fn [f]
                      (println "each" (swap! c inc))
                      (f)))
weavejester commented 7 years ago

Could you squash your commits? I was going to manually merge the PR into master, but I see you've merged master into the PR.

Deraen commented 7 years ago

@weavejester Squashed both PRs.

Deraen commented 7 years ago

Btw. noticed a test is failing, but this happens even without my PRs, could be the catch output feature?

weavejester commented 7 years ago

Maybe. I'll take a look. The tests passed last I checked... I should really add them to the CI.