diff options
Diffstat (limited to 'cli/tests/unit/console_test.ts')
-rw-r--r-- | cli/tests/unit/console_test.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index eb2c51aef..514b29cc2 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -8,7 +8,12 @@ // std/fmt/colors auto determines whether to put colors in or not. We need // better infrastructure here so we can properly test the colors. -import { assert, assertEquals, unitTest } from "./test_util.ts"; +import { + assert, + assertEquals, + assertStringContains, + unitTest, +} from "./test_util.ts"; import { stripColor } from "../../../std/fmt/colors.ts"; const customInspect = Deno.customInspect; @@ -1650,3 +1655,8 @@ unitTest(function inspectProxy(): void { "Proxy [ [Function: fn], { get: [Function: get] } ]", ); }); + +unitTest(function inspectColors(): void { + assertEquals(Deno.inspect(1), "1"); + assertStringContains(Deno.inspect(1, { colors: true }), "\x1b["); +}); |