Skip to content

Commit

Permalink
test: cover util.inspect on boxed primitive with colors
Browse files Browse the repository at this point in the history
PR-URL: #27897
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
pinguinjkeke authored and targos committed May 31, 2019
1 parent 0fe16ed commit 630cc3a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,10 @@ assert.strictEqual(

// Test boxed primitives output the correct values.
assert.strictEqual(util.inspect(new String('test')), "[String: 'test']");
assert.strictEqual(
util.inspect(new String('test'), { colors: true }),
"\u001b[32m[String: 'test']\u001b[39m"
);
assert.strictEqual(
util.inspect(Object(Symbol('test'))),
'[Symbol: Symbol(test)]'
Expand Down

0 comments on commit 630cc3a

Please sign in to comment.