From 1e78643c15ccdbf4e3050c40e8cca6830a6ca66c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 14 Jan 2022 16:25:00 +0000 Subject: [PATCH] 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 --- test/parallel/test-util-inspect.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 029b7cde8a06f8..64852a8bca38b7 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -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' + ); }