Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,14 @@ function formatValue(ctx, value, recurseTimes, ln) {
if (ctx.showHidden) {
formatter = formatWeakSet;
} else {
extra = '[items unknown]';
extra = '<items unknown>';
}
} else if (isWeakMap(value)) {
braces[0] = `${getPrefix(constructor, tag)}{`;
if (ctx.showHidden) {
formatter = formatWeakMap;
} else {
extra = '[items unknown]';
extra = '<items unknown>';
}
} else {
// Check boxed primitives other than string with valueOf()
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ util.inspect(process);
assert.strictEqual(out, expect);

out = util.inspect(weakMap);
expect = 'WeakMap { [items unknown] }';
expect = 'WeakMap { <items unknown> }';
assert.strictEqual(out, expect);

out = util.inspect(weakMap, { maxArrayLength: 0, showHidden: true });
Expand All @@ -1385,7 +1385,7 @@ util.inspect(process);
assert.strictEqual(out, expect);

out = util.inspect(weakSet);
expect = 'WeakSet { [items unknown] }';
expect = 'WeakSet { <items unknown> }';
assert.strictEqual(out, expect);

out = util.inspect(weakSet, { maxArrayLength: -2, showHidden: true });
Expand Down