mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user