diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2023-11-15 14:10:12 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 14:10:12 +0900 |
commit | c67de43ff3221ae5554398095261d684b6d41dda (patch) | |
tree | 7ffe8fddeb575b3203787745845ab99acb883cff /cli | |
parent | 4913274a6508a5e5ad6c8babf2e90a4a84bf98ec (diff) |
fix(runtime): fix Deno.noColor when stdout is not tty (#21208)
Diffstat (limited to 'cli')
-rw-r--r-- | cli/tests/unit/tty_color_test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/unit/tty_color_test.ts b/cli/tests/unit/tty_color_test.ts index 747d92dcc..3adc16b23 100644 --- a/cli/tests/unit/tty_color_test.ts +++ b/cli/tests/unit/tty_color_test.ts @@ -13,3 +13,14 @@ Deno.test( assertEquals(output, "1\n"); }, ); + +Deno.test( + { permissions: { run: true, read: true } }, + async function denoNoColorIsNotAffectedByNonTty() { + const { stdout } = await new Deno.Command(Deno.execPath(), { + args: ["eval", "console.log(Deno.noColor)"], + }).output(); + const output = new TextDecoder().decode(stdout); + assertEquals(output, "false\n"); + }, +); |