From b53068ec0de75711896855eadfcca3415f673a66 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 11 Nov 2020 08:36:21 -0800 Subject: [PATCH] test: add util.inspect test for null maxStringLength Add test case to cover currently-uncovered code. Refs: https://coverage.nodejs.org/coverage-39a7f7663e8f70fc/lib/internal/util/inspect.js.html#L333 PR-URL: https://github.com/nodejs/node/pull/36086 Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca Reviewed-By: Daijiro Wachi --- test/parallel/test-util-inspect.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 3d5fb995c6181f..9187af18da3099 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -2905,6 +2905,7 @@ assert.strictEqual( util.inspect(x, { maxStringLength: 4 }), "'aaaa'... 999996 more characters" ); + assert.match(util.inspect(x, { maxStringLength: null }), /a'$/); } {