Skip to content

Commit a8558ec

Browse files
Trottdanielleadams
authored andcommitted
test: add coverage for util.inspect()
Coverage stats indicate that there is no coverage for util.inspect() with a negative number and a numeric separator. Add a test case. Refs: https://coverage.nodejs.org/coverage-df507758e6c35534/lib/internal/util/inspect.js.html#L1463 PR-URL: #41527 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 1425e75 commit a8558ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/parallel/test-util-inspect.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3231,4 +3231,9 @@ assert.strictEqual(
32313231
util.inspect(123456789.12345678, { numericSeparator: true }),
32323232
'123_456_789.123_456_78'
32333233
);
3234+
3235+
assert.strictEqual(
3236+
util.inspect(-123456789.12345678, { numericSeparator: true }),
3237+
'-123_456_789.123_456_78'
3238+
);
32343239
}

0 commit comments

Comments
 (0)