nodeunit icon indicating copy to clipboard operation
nodeunit copied to clipboard

nodeunit should catch exceptions and report them as failures

Open christophsturm opened this issue 13 years ago • 6 comments

right now if a test throws an exception, the process just exits.

christophsturm avatar Feb 14 '12 16:02 christophsturm

+1

nickminutello avatar Jun 25 '12 13:06 nickminutello

btw we just switched to mocha, for this and other reasons.

christophsturm avatar Jun 25 '12 14:06 christophsturm

+1 It happens only if the exception is thrown from an asynchronous callback. If the exception is thrown from a synchronous test flow the exception is caught and the test continues normally.

gilad61 avatar Aug 01 '12 13:08 gilad61

See suggested fix in #177 (https://github.com/caolan/nodeunit/pull/177)

gilad61 avatar Aug 01 '12 16:08 gilad61

:+1:

jorgebay avatar Jul 19 '13 10:07 jorgebay

Dealbreaker for me - uncaught exceptions are gonna be everywhere, tests need to be able to catch them.

alexsolus avatar Jul 06 '16 01:07 alexsolus