mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: improve coverage for util.inspect() with classes
Refs: https://github.com/nodejs/node/pull/36622#pullrequestreview-558721102 PR-URL: https://github.com/nodejs/node/pull/36625 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
1 parent
e82a2e8ad5
commit
581a95f0ea
1 file changed
+5
@@ -2011,6 +2011,11 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
|
||||
rest[rest.length - 1] = rest[rest.length - 1].slice(0, -1);
|
||||
rest.length = 1;
|
||||
}
|
||||
Object.setPrototypeOf(clazz, Map.prototype);
|
||||
assert.strictEqual(
|
||||
util.inspect(clazz),
|
||||
['[class', name, '[Map]', ...rest].join(' ') + ']'
|
||||
);
|
||||
Object.setPrototypeOf(clazz, null);
|
||||
assert.strictEqual(
|
||||
util.inspect(clazz),
|
||||
|
||||
Reference in new issue
Block a user