-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fatal errors in test callbacks are not displayed (with fix) #279
Comments
I want this too, but see issue #177 :-( |
With my PR #281 the output of your test t.js above is: rpaterson@baloo2:nodeunit (domains)$ dist/nodeunit/bin/nodeunit t.js
t.js
✖ test
TypeError: Cannot set property 'a' of undefined
at [object Object]._onTimeout (/home/rpaterson/Programming/signpost/nodeunit/t.js:5:17)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
FAILURES: 1/1 assertions failed (9ms)
|
@rpaterson, your output is cleaner, works for me! If not yours, my "fix" is passive and doesn't change the active code. |
👍 |
Huge +1 here. Can we get this PR in? #281 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fatal errors in callbacks defined in the test functions are not displayed,
only the "test.done() not called" diagnostic is shown. It's useful to have
the error and line number too. (If not in a callback, the error is reported
as expected.)
To reproduce the issue, create a file t.js:
Current nodeunit outputs:
with the propsed fix it outputs:
The proposed fix:
The text was updated successfully, but these errors were encountered: