Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 630cc3a

Browse filesBrowse files
pinguinjkeketargos
authored andcommitted
test: cover util.inspect on boxed primitive with colors
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>
1 parent 0fe16ed commit 630cc3a
Copy full SHA for 630cc3a

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-util-inspect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,10 @@ assert.strictEqual(
902902

903903
// Test boxed primitives output the correct values.
904904
assert.strictEqual(util.inspect(new String('test')), "[String: 'test']");
905+
assert.strictEqual(
906+
util.inspect(new String('test'), { colors: true }),
907+
"\u001b[32m[String: 'test']\u001b[39m"
908+
);
905909
assert.strictEqual(
906910
util.inspect(Object(Symbol('test'))),
907911
'[Symbol: Symbol(test)]'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.