crisptrutski / boot-cljs-test

Boot task to run ClojureScript tests.
53 stars 18 forks source link

Remove exit? option and custom error handling #53

Closed Deraen closed 7 years ago

Deraen commented 7 years ago

Since 2.7 Boot can hide the stacktrace of exceptions during watch. With this it is okay to always throw the exception and because the stacktrace is hidden, user sees the proper test output in console anyway.

crisptrutski commented 7 years ago

It does look tempting to remove all this fluff! However the reason for delayed reporting was not really any shortcoming in boot, it came from the desire for "entire" reports vs failing fast - eg. reporting the server side and client side errors, errors from multiple suites, and/or environments, comprehensively, rather than skipping later tests.

Perhaps there already is a better mechanism to achieve this without adding the clumsy "defer" knobs here, but should address that use case before making a breaking change.

Renaming exit? to throw? and making it on by default seems enough to make library a better Boot citizen - am I missing deeper reasons for removing the knob completely?

Deraen commented 7 years ago

I think it would be possible by catching exceptions from run-tests! and always running next-task and then rethrowing the exception after other tasks have been ran.

Deraen commented 7 years ago

Though that would cause build artifacts being created if tests are being run as part of packaging task.

crisptrutski commented 7 years ago

@Deraen before this gets colder, what do you think about just renaming and switching the default behaviour? Moving the "collapse or ignore failures" behaviour to a completely separate tasks seems feasible, but I don't have that itch. And make use of these knobs currently.