summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-11-23 21:13:52 -0800
committerRich Trott <rtrott@gmail.com>2019-11-25 21:33:13 -0800
commita6fd2828c61e866e2cdda4ff783ea25dd582ac3d (patch)
treeb06dcd8a48e634561160a4708d4dd563ab8baccc /test
parentf2060fa9e6d7b179c3c49b2e630e3bc981a565de (diff)
downloadandroid-node-v8-a6fd2828c61e866e2cdda4ff783ea25dd582ac3d.tar.gz
android-node-v8-a6fd2828c61e866e2cdda4ff783ea25dd582ac3d.tar.bz2
android-node-v8-a6fd2828c61e866e2cdda4ff783ea25dd582ac3d.zip
test: use useful message argument in test function
The message argument of two test functions in test-inspector-async-call-stack is useful but unused. Use it! PR-URL: https://github.com/nodejs/node/pull/30618 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'test')
-rw-r--r--test/sequential/test-inspector-async-call-stack.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/sequential/test-inspector-async-call-stack.js b/test/sequential/test-inspector-async-call-stack.js
index f6a48b339d..f050487da7 100644
--- a/test/sequential/test-inspector-async-call-stack.js
+++ b/test/sequential/test-inspector-async-call-stack.js
@@ -6,18 +6,20 @@ common.skipIf32Bits();
const assert = require('assert');
const { internalBinding } = require('internal/test/binding');
-const async_wrap = internalBinding('async_wrap');
-const { kTotals } = async_wrap.constants;
+const { async_hook_fields, constants } = internalBinding('async_wrap');
+const { kTotals } = constants;
const inspector = require('inspector');
const setDepth = 'Debugger.setAsyncCallStackDepth';
function verifyAsyncHookDisabled(message) {
- assert.strictEqual(async_wrap.async_hook_fields[kTotals], 0);
+ assert.strictEqual(async_hook_fields[kTotals], 0,
+ `${async_hook_fields[kTotals]} !== 0: ${message}`);
}
function verifyAsyncHookEnabled(message) {
- assert.strictEqual(async_wrap.async_hook_fields[kTotals], 4);
+ assert.strictEqual(async_hook_fields[kTotals], 4,
+ `${async_hook_fields[kTotals]} !== 4: ${message}`);
}
// By default inspector async hooks should not have been installed.