-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
test-runner: Assert stack trace is stripped when used within test
#48840
Comments
Also happens with describe('tests', () => {
it('should fail', () => {
assert.strictEqual(0, 1);
})
}) |
I think it might be this line: Line 1612 in c301404
causing the problem |
But also, this may not be a bug and is instead working as intended. I've noticed that the original error is available as |
The Changing the error type to unwrap it in core would be a breaking change at this point (but could technically still be done). I think the docs are wrong too, as they currently state:
But this appears to be the wrapped error. |
Yeah sounds good. I'm at the same conclusion now myself after tinkering with it in core a bit. I will send a docs update to close out this issue |
Version
20.3.1
Platform
Darwin Ethans-MBP 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
Subsystem
test-runner
What steps will reproduce the bug?
Clone: https://github.com/Ethan-Arrowood/node-test-runner-assert-stack-trace-issue
Run:
npm run expected
Then:
npm run actual
See difference.
Expected:
Actual:
How often does it reproduce? Is there a required condition?
Any assert failure within a
test
block causes issue.What is the expected behavior? Why is that the expected behavior?
I expect to get the complete stack trace from
assert
in my test reporterWhat do you see instead?
Incomplete stack trace
Additional information
No response
The text was updated successfully, but these errors were encountered: