diff options
author | Rich Trott <rtrott@gmail.com> | 2019-11-25 22:12:40 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-11-27 22:39:46 -0800 |
commit | 80c170e66fcdbb0ead33cee28129b16a30b33afd (patch) | |
tree | ea35c24d21c129bd08c9eb77e92d5b46a3f80703 | |
parent | ea7a6f9dbd05654fff3f8c474ac0f5126bc87376 (diff) | |
download | android-node-v8-80c170e66fcdbb0ead33cee28129b16a30b33afd.tar.gz android-node-v8-80c170e66fcdbb0ead33cee28129b16a30b33afd.tar.bz2 android-node-v8-80c170e66fcdbb0ead33cee28129b16a30b33afd.zip |
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>
-rw-r--r-- | test/sequential/test-inspector-contexts.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sequential/test-inspector-contexts.js b/test/sequential/test-inspector-contexts.js index 793868e3bc..822b21f3ea 100644 --- a/test/sequential/test-inspector-contexts.js +++ b/test/sequential/test-inspector-contexts.js @@ -155,4 +155,4 @@ async function testBreakpointHit() { await pausedPromise; } -testContextCreatedAndDestroyed().then(testBreakpointHit); +testContextCreatedAndDestroyed().then(common.mustCall(testBreakpointHit)); |