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 BethGriggs committed Dec 15, 2020
1 parent 929e127 commit b53068e
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 b53068e

Please sign in to comment.