Skip to content

Commit c9b4b43

Browse files
committed
test: cover util.inspect on boxed primitive with colors
1 parent 725a66a commit c9b4b43

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/parallel/test-util-inspect.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,10 @@ assert.strictEqual(
895895

896896
// Test boxed primitives output the correct values.
897897
assert.strictEqual(util.inspect(new String('test')), "[String: 'test']");
898+
assert.strictEqual(
899+
util.inspect(new String('test'), { colors: true }),
900+
"\u001b[32m[String: 'test']\u001b[39m"
901+
);
898902
assert.strictEqual(
899903
util.inspect(Object(Symbol('test'))),
900904
'[Symbol: Symbol(test)]'

0 commit comments

Comments
 (0)