Skip to content

Commit 8a63ea1

Browse files
Trotttargos
authored andcommitted
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: #30618 Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent c50e4f9 commit 8a63ea1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/sequential/test-inspector-async-call-stack.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ common.skipIf32Bits();
66

77
const assert = require('assert');
88
const { internalBinding } = require('internal/test/binding');
9-
const async_wrap = internalBinding('async_wrap');
10-
const { kTotals } = async_wrap.constants;
9+
const { async_hook_fields, constants } = internalBinding('async_wrap');
10+
const { kTotals } = constants;
1111
const inspector = require('inspector');
1212

1313
const setDepth = 'Debugger.setAsyncCallStackDepth';
1414

1515
function verifyAsyncHookDisabled(message) {
16-
assert.strictEqual(async_wrap.async_hook_fields[kTotals], 0);
16+
assert.strictEqual(async_hook_fields[kTotals], 0,
17+
`${async_hook_fields[kTotals]} !== 0: ${message}`);
1718
}
1819

1920
function verifyAsyncHookEnabled(message) {
20-
assert.strictEqual(async_wrap.async_hook_fields[kTotals], 4);
21+
assert.strictEqual(async_hook_fields[kTotals], 4,
22+
`${async_hook_fields[kTotals]} !== 4: ${message}`);
2123
}
2224

2325
// By default inspector async hooks should not have been installed.

0 commit comments

Comments
 (0)