Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: slightly improve test-util-inspect assertions
  • Loading branch information
addaleax committed May 14, 2018
commit 435855547b115b19423aee089c16557e55943353
6 changes: 4 additions & 2 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,8 @@ util.inspect(process);
expect = 'WeakMap { [ [length]: 0 ] => {}, ... more items, extra: true }';
const expectAlt = 'WeakMap { {} => [ [length]: 0 ], ... more items, ' +
'extra: true }';
assert(out === expect || out === expectAlt);
assert(out === expect || out === expectAlt,
`Found "${out}" rather than "${expect}" or "${expectAlt}"`);
}

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

{ // Test argument objects.
Expand Down