From 1e0bbb45770590074ec3b33ed96a415c31d55465 Mon Sep 17 00:00:00 2001 From: Jeremy Klas Date: Sat, 13 Aug 2022 09:09:13 -0700 Subject: [PATCH] expose --no-color option to cli to turn off console output colors --- docs/guide/cli.md | 1 + packages/vitest/src/node/cli.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/guide/cli.md b/docs/guide/cli.md index a6bc946c311a..63cea34b266b 100644 --- a/docs/guide/cli.md +++ b/docs/guide/cli.md @@ -75,6 +75,7 @@ vitest related /src/index.ts /src/hello-world.js | `--changed [since]` | Run tests that are affected by the changed files (default: false). See [docs](#changed) | | `--shard ` | Execute tests in a specified shard | | `--sequence` | Define in what order to run tests. Use [cac's dot notation] to specify options (for example, use `--sequence.shuffle` to run tests in random order) | +| `--no-color` | Removes colors from the console output | | `-h, --help` | Display available CLI options | ### changed diff --git a/packages/vitest/src/node/cli.ts b/packages/vitest/src/node/cli.ts index 74d3bafbde9e..470f5e2d6d55 100644 --- a/packages/vitest/src/node/cli.ts +++ b/packages/vitest/src/node/cli.ts @@ -38,6 +38,7 @@ cli .option('--shard ', 'Test suite shard to execute in a format of /') .option('--changed [since]', 'Run tests that are affected by the changed files (default: false)') .option('--sequence ', 'Define in what order to run tests (use --sequence.shuffle to run tests in random order)') + .option('--no-color', 'Removes colors from the console output') .help() cli