-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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: unwrap error message in TAP reporter #48942
Conversation
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs#48941
Review requested:
|
@@ -56,7 +56,7 @@ not ok 2 - before throws | |||
duration_ms: * | |||
type: 'suite' | |||
failureType: 'hookFailed' | |||
error: 'failed running before hook' | |||
error: 'before' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it looks like these error messages are actually less helpful - these are the actual message from the error objects thrown in the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjihrig and why is there no stack? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that just the snapshot behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out lines 61 and 62 (in the TAP reporter, the error is serialized to YAML, not a nice to read error like the spec reporter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Landed in bef3942 |
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs#48941 PR-URL: nodejs#48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs#48941 PR-URL: nodejs#48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs#48941 PR-URL: nodejs#48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs#48941 PR-URL: nodejs#48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs#48941 PR-URL: nodejs#48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: #48941 PR-URL: #48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs#48941 PR-URL: nodejs#48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: #48941 PR-URL: #48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: #48941 PR-URL: #48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs/node#48941 PR-URL: nodejs/node#48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message. Fixes: nodejs/node#48941 PR-URL: nodejs/node#48942 Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
The TAP reporter unwraps errors that come from user code. It was not properly unwrapping the error message when the failure originated from a test hook. This lead to difficult to debug errors when TAP output was used. This commit updates the TAP reporter to properly unwrap the error message.
Fixes: #48941