Skip to content

Commit 34d1d79

Browse files
Trottdanielleadams
authored andcommitted
test: improve coverage for util.inspect() with classes
Refs: #36622 (review) PR-URL: #36625 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 1f3bc5e commit 34d1d79

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/parallel/test-util-inspect.js

+5
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,11 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
20112011
rest[rest.length - 1] = rest[rest.length - 1].slice(0, -1);
20122012
rest.length = 1;
20132013
}
2014+
Object.setPrototypeOf(clazz, Map.prototype);
2015+
assert.strictEqual(
2016+
util.inspect(clazz),
2017+
['[class', name, '[Map]', ...rest].join(' ') + ']'
2018+
);
20142019
Object.setPrototypeOf(clazz, null);
20152020
assert.strictEqual(
20162021
util.inspect(clazz),

0 commit comments

Comments
 (0)