Skip to content

Commit

Permalink
test: add util.inspect test for null maxStringLength
Browse files Browse the repository at this point in the history
Add test case to cover currently-uncovered code.

Refs: https://coverage.nodejs.org/coverage-39a7f7663e8f70fc/lib/internal/util/inspect.js.html#L333

PR-URL: #36086
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
  • Loading branch information
Trott authored and codebytere committed Nov 22, 2020
1 parent e54108f commit 3be5e86
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/parallel/test-util-inspect.js
Expand Up @@ -2906,6 +2906,7 @@ assert.strictEqual(
util.inspect(x, { maxStringLength: 4 }),
"'aaaa'... 999996 more characters"
);
assert.match(util.inspect(x, { maxStringLength: null }), /a'$/);
}

{
Expand Down

0 comments on commit 3be5e86

Please sign in to comment.