Skip to content

Conversation

@blairwilcox
Copy link
Contributor

Shows the result of the wasPending in the error message if the
assertion fails.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

Shows the result of the wasPending in the error message if the assertion fails.
@nodejs-github-botnodejs-github-bot added dont-land-on-v4.x node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests. labels Jan 27, 2018
constexception_pending=test_exception.wasPending();
assert.strictEqual(exception_pending,true,
'Expected exception to be pending, but'+
`it was marked as ${exception_pending}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}` 

constexception_pending=test_exception.wasPending();
assert.strictEqual(exception_pending,false,
'Expected no exception to be pending, but'+
` it was marked as ${exception_pending}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above, although with the text changed to reverse the expectation.

Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Updated the error message for pending exceptions so that it was a bit more clear.
@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 31, 2018
@BridgeAR
Copy link
Member

@blairwilcox
Copy link
ContributorAuthor

@Trott Thanks for the feedback, I wasn't quite sure what to put there. I updated the error messages. How do they look?

Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the pull request!

@BridgeAR
Copy link
Member

Landed in 0c16b18

@BridgeARBridgeAR closed this Feb 1, 2018
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
@addaleaxaddaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 4, 2018
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Feb 21, 2018
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 16, 2018
Shows the result of the wasPending in the error message if the assertion fails. Backport-PR-URL: #19447 PR-URL: #18413 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Apr 16, 2018
MylesBorins pushed a commit that referenced this pull request May 1, 2018
Shows the result of the wasPending in the error message if the assertion fails. Backport-PR-URL: #19265 PR-URL: #18413 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request May 2, 2018
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

node-apiIssues and PRs related to the Node-API.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@blairwilcox@BridgeAR@jasnell@Trott@addaleax@nodejs-github-bot