From eff5459378497def9450e50144f6fd433d33a252 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 18 Jun 2024 16:59:20 +0200 Subject: [PATCH 1/2] fix(ext/console): bump default max str lengthto 10_00 --- ext/console/01_console.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/console/01_console.js b/ext/console/01_console.js index 785d7ffe6ccd09..90f09d4d1741c6 100644 --- a/ext/console/01_console.js +++ b/ext/console/01_console.js @@ -2329,7 +2329,7 @@ const denoInspectDefaultOptions = { // node only maxArrayLength: 100, - maxStringLength: 100, // deno: strAbbreviateSize: 100 + maxStringLength: 10_000, // deno: strAbbreviateSize: 10_000 customInspect: true, // deno only @@ -2357,7 +2357,7 @@ function getDefaultInspectOptions() { const DEFAULT_INDENT = " "; // Default indent string -const STR_ABBREVIATE_SIZE = 100; +const STR_ABBREVIATE_SIZE = 10_000; class CSI { static kClear = "\x1b[1;1H"; From 0bc9e6754f977e083cf0f64ecfa9fb1d19e83b9b Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 18 Jun 2024 17:24:09 +0200 Subject: [PATCH 2/2] fix --- tests/unit/console_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/console_test.ts b/tests/unit/console_test.ts index 3eee2c9ff278df..49960f66393efb 100644 --- a/tests/unit/console_test.ts +++ b/tests/unit/console_test.ts @@ -174,11 +174,11 @@ Deno.test(function consoleTestStringifyQuotes() { }); Deno.test(function consoleTestStringifyLongStrings() { - const veryLongString = "a".repeat(200); + const veryLongString = "a".repeat(10_100); // If we stringify an object containing the long string, it gets abbreviated. let actual = stringify({ veryLongString }); assert(actual.includes("...")); - assert(actual.length < 200); + assert(actual.length < 10_100); // However if we stringify the string itself, we get it exactly. actual = stringify(veryLongString); assertEquals(actual, veryLongString);