From 6a356aff1380e79d67738c5b43aa2b5fee76600d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 11 Jun 2024 12:41:44 +0100 Subject: chore: sync up Node.js test files for v20.11.1 (#24066) Co-authored-by: Yoshiya Hinosawa --- ext/node/polyfills/internal/cli_table.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/node/polyfills/internal/cli_table.ts') diff --git a/ext/node/polyfills/internal/cli_table.ts b/ext/node/polyfills/internal/cli_table.ts index 574081ba4..9826e524f 100644 --- a/ext/node/polyfills/internal/cli_table.ts +++ b/ext/node/polyfills/internal/cli_table.ts @@ -27,11 +27,10 @@ const renderRow = (row: string[], columnWidths: number[]) => { for (let i = 0; i < row.length; i++) { const cell = row[i]; const len = getStringWidth(cell); - const needed = (columnWidths[i] - len) / 2; + const needed = columnWidths[i] - len; // round(needed) + ceil(needed) will always add up to the amount // of spaces we need while also left justifying the output. - out += " ".repeat(needed) + cell + - " ".repeat(Math.ceil(needed)); + out += cell + " ".repeat(Math.ceil(needed)); if (i !== row.length - 1) { out += tableChars.middle; } -- cgit v1.2.3