test: show pending exception error in napi tests#18413
Closed
blairwilcox wants to merge 2 commits intonodejs:masterfrom
blairwilcox:display-values-test-exception
Closed
test: show pending exception error in napi tests#18413blairwilcox wants to merge 2 commits intonodejs:masterfrom blairwilcox:display-values-test-exception
blairwilcox wants to merge 2 commits intonodejs:masterfrom
blairwilcox:display-values-test-exception
Conversation
Shows the result of the wasPending in the error message if the assertion fails.
jasnell
approved these changes
Jan 29, 2018
Trott
reviewed
Jan 30, 2018
| const exception_pending = test_exception.wasPending(); | ||
| assert.strictEqual(exception_pending, true, | ||
| 'Expected exception to be pending, but' + | ||
| `it was marked as ${exception_pending}`); |
Member
There was a problem hiding this comment.
I think this change might be more confusing than helpful. Is "marked as false" going to help someone or confuse them?
How about this:
`Exception not pending as expected, .wasPending() returned ${exception_pending}`
Trott
reviewed
Jan 30, 2018
| const exception_pending = test_exception.wasPending(); | ||
| assert.strictEqual(exception_pending, false, | ||
| 'Expected no exception to be pending, but' + | ||
| ` it was marked as ${exception_pending}`); |
Member
There was a problem hiding this comment.
Same comment as above, although with the text changed to reverse the expectation.
Trott
requested changes
Jan 30, 2018
Member
Trott
left a comment
There was a problem hiding this comment.
Thanks for the pull request. It's close, I think, but I'd like to see the text improved a little bit. What do you think?
BridgeAR
approved these changes
Jan 31, 2018
Updated the error message for pending exceptions so that it was a bit more clear.
Member
Contributor
Author
|
@Trott Thanks for the feedback, I wasn't quite sure what to put there. I updated the error messages. How do they look? |
Trott
approved these changes
Jan 31, 2018
Member
Trott
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the pull request!
Member
|
Landed in 0c16b18 |
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this pull request
Feb 1, 2018
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: nodejs#18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Feb 20, 2018
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: #18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Feb 21, 2018
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: #18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Feb 21, 2018
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: #18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
gabrielschulhof
pushed a commit
to gabrielschulhof/node
that referenced
this pull request
Apr 12, 2018
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: nodejs#18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
gabrielschulhof
pushed a commit
to gabrielschulhof/node
that referenced
this pull request
Apr 16, 2018
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: nodejs#18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
Merged
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
May 8, 2018
Shows the result of the wasPending in the error message if the assertion fails. PR-URL: nodejs#18413 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shows the result of the wasPending in the error message if the
assertion fails.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)