mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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: https://github.com/nodejs/node/pull/41527 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
@@ -3231,4 +3231,9 @@ assert.strictEqual(
|
||||
util.inspect(123456789.12345678, { numericSeparator: true }),
|
||||
'123_456_789.123_456_78'
|
||||
);
|
||||
|
||||
assert.strictEqual(
|
||||
util.inspect(-123456789.12345678, { numericSeparator: true }),
|
||||
'-123_456_789.123_456_78'
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user