Skip to content

Commit 97e6273

Browse files
Trottaddaleax
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 d651c7d commit 97e6273

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ common.skipIf32Bits();
66

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

1313
constsetDepth='Debugger.setAsyncCallStackDepth';
1414

1515
functionverifyAsyncHookDisabled(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
functionverifyAsyncHookEnabled(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)