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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
  • Loading branch information
Trott authored and BethGriggs committed Dec 9, 2020
1 parent 33c2465 commit fc9f81a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -2905,6 +2905,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 fc9f81a

Please sign in to comment.