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 a6667d6

Browse filesBrowse files
addaleaxMylesBorins
authored andcommitted
test: slightly improve test-util-inspect assertions
PR-URL: #20721 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 6f4e9ff commit a6667d6
Copy full SHA for a6667d6

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-util-inspect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,8 @@ util.inspect(process);
13741374
expect = 'WeakMap { [ [length]: 0 ] => {}, ... more items, extra: true }';
13751375
const expectAlt = 'WeakMap { {} => [ [length]: 0 ], ... more items, ' +
13761376
'extra: true }';
1377-
assert(out === expect || out === expectAlt);
1377+
assert(out === expect || out === expectAlt,
1378+
`Found "${out}" rather than "${expect}" or "${expectAlt}"`);
13781379
}
13791380

13801381
{ // Test WeakSet
@@ -1397,7 +1398,8 @@ util.inspect(process);
13971398
expect = 'WeakSet { {}, ... more items, extra: true }';
13981399
const expectAlt = 'WeakSet { [ 1, [length]: 1 ], ... more items, ' +
13991400
'extra: true }';
1400-
assert(out === expect || out === expectAlt);
1401+
assert(out === expect || out === expectAlt,
1402+
`Found "${out}" rather than "${expect}" or "${expectAlt}"`);
14011403
}
14021404

14031405
{ // Test argument objects.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.