mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
test: add mustCall() to test-inspector-contexts
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: https://github.com/nodejs/node/issues/30519#issuecomment-558476839 PR-URL: https://github.com/nodejs/node/pull/30649 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
ea7a6f9dbd
commit
80c170e66f
1 file changed
+1
-1
@@ -155,4 +155,4 @@ async function testBreakpointHit() {
|
||||
await pausedPromise;
|
||||
}
|
||||
|
||||
testContextCreatedAndDestroyed().then(testBreakpointHit);
|
||||
testContextCreatedAndDestroyed().then(common.mustCall(testBreakpointHit));
|
||||
Reference in new issue
Block a user