Skip to content

Commit a6667d6

Browse files
addaleaxMylesBorins
authored andcommitted
test: slightly improve test-util-inspect assertions
PR-URL: #20721 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 6f4e9ff commit a6667d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/parallel/test-util-inspect.js

+4-2
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)