Skip to content

Commit

Permalink
test: add mustCall() to test-inspector-contexts
Browse files Browse the repository at this point in the history
In test-inspector-contexts, if mainContextPromise is modified such that
the `method` argument is changed to something invalid, the test still
passes and the second part of the test never runs. Use
`common.mustCall()` to cause the test to fail if the second part of the
test does not run.

Refs: nodejs#30519 (comment)

PR-URL: nodejs#30649
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott committed Nov 28, 2019
1 parent ea7a6f9 commit 80c170e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/sequential/test-inspector-contexts.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ async function testBreakpointHit() {
await pausedPromise;
}

testContextCreatedAndDestroyed().then(testBreakpointHit);
testContextCreatedAndDestroyed().then(common.mustCall(testBreakpointHit));

0 comments on commit 80c170e

Please sign in to comment.