gfredericks / test.chuck

A utility library for test.check
Eclipse Public License 1.0
215 stars 26 forks source link

Fix missing output from tests #29

Closed nberger closed 8 years ago

nberger commented 8 years ago

The checking macro was not printing the test.check result in case of failures. This was happening since we changed the assertion on the result of checking to only check if there was an exception. That change was introduced to fix #17, which was about the output showing an "expected: (not-falsey-or-exception? (:result result))" message. But as a side-effect of that change, we lost the test.check result from the output, which is very valuable.

The fix is to simply print the test.check result in case of failure. This is part of what do-report would do if we called (is (:result result) result) but now we avoid the other stuff that call would do (incrementing test result counters, output the expected vs actual result of the assertion, etc) by just calling println.

As a side-effect of this change, the :pass count in case of a failure was fixed. That can be seen by the change in the failure-detecion-test

Fixes #28

nberger commented 8 years ago

Build is broken, tests are not running in cljs, I'm checking it... :/

nberger commented 8 years ago

Build fixed. PR ready from my side.

nberger commented 8 years ago

@gfredericks: did you have some time to take a look into this? Let me know if you want me to change or clarify something.

dparis commented 8 years ago

Just started using clojure-test/checking in some new tests, would be very interested in seeing this merged as well.

gfredericks commented 8 years ago

@nberger I just gave you push access to the repo; feel free to merge if you're confident it works right.

nberger commented 8 years ago

@gfredericks: thanks :)

@dparis: I'm merging this now

gfredericks commented 8 years ago

@dparis the circleci build is failing after the merge, so I'll hold off on releasing until we figure out what happened