From 37696320a23ca50aa640a303a2f7b80dbef84721 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 25 Nov 2019 22:12:40 -0800 Subject: [PATCH] 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 Reviewed-By: Anto Aravinth Reviewed-By: Denys Otrishko Reviewed-By: Luigi Pinca --- test/sequential/test-inspector-contexts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequential/test-inspector-contexts.js b/test/sequential/test-inspector-contexts.js index 793868e3bc072c..822b21f3eac841 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));