Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 97e6273

Browse filesBrowse 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 <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>
1 parent d651c7d commit 97e6273
Copy full SHA for 97e6273

File tree

Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/sequential/test-inspector-async-call-stack.js
+6-4Lines changed: 6 additions & 4 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.