From d13e1779f2cc9a44322ccd3812c7b909075dfa10 Mon Sep 17 00:00:00 2001 From: Kevin Brotcke Date: Fri, 30 Apr 2021 01:55:30 -0700 Subject: [PATCH] docs: Clarify CLI param testPathIgnorePatterns usage (#11304) --- docs/CLI.md | 6 ++++-- website/versioned_docs/version-25.x/CLI.md | 6 ++++-- website/versioned_docs/version-26.x/CLI.md | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/CLI.md b/docs/CLI.md index e1a81ebe4f53..20191cf7dd7d 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -321,9 +321,11 @@ Note that `column` is 0-indexed while `line` is not. A regexp pattern string that is matched against all tests paths before executing the test. On Windows, you will need to use `/` as a path separator or escape `\` as `\\`. -### `--testPathIgnorePatterns=[array]` +### `--testPathIgnorePatterns=|[array]` -An array of regexp pattern strings that are tested against all tests paths before executing the test. Contrary to `--testPathPattern`, it will only run those tests with a path that does not match with the provided regexp expressions. +A single or array of regexp pattern strings that are tested against all tests paths before executing the test. Contrary to `--testPathPattern`, it will only run those tests with a path that does not match with the provided regexp expressions. + +To pass as an array use escaped parentheses and space delimited regexps such as `\(/node_modules/ /tests/e2e/\)`. Alternatively, you can omit parentheses by combining regexps into a single regexp like `/node_modules/|/tests/e2e/`. These two examples are equivalent. ### `--testRunner=` diff --git a/website/versioned_docs/version-25.x/CLI.md b/website/versioned_docs/version-25.x/CLI.md index 492581caa7a5..4f80c8f951e9 100644 --- a/website/versioned_docs/version-25.x/CLI.md +++ b/website/versioned_docs/version-25.x/CLI.md @@ -305,9 +305,11 @@ Note that `column` is 0-indexed while `line` is not. A regexp pattern string that is matched against all tests paths before executing the test. On Windows, you will need to use `/` as a path separator or escape `\` as `\\`. -### `--testPathIgnorePatterns=[array]` +### `--testPathIgnorePatterns=|[array]` -An array of regexp pattern strings that are tested against all tests paths before executing the test. Contrary to `--testPathPattern`, it will only run those tests with a path that does not match with the provided regexp expressions. +A single or array of regexp pattern strings that are tested against all tests paths before executing the test. Contrary to `--testPathPattern`, it will only run those tests with a path that does not match with the provided regexp expressions. + +To pass as an array use escaped parentheses and space delimited regexps such as `\(/node_modules/ /tests/e2e/\)`. Alternatively, you can omit parentheses by combining regexps into a single regexp like `/node_modules/|/tests/e2e/`. These two examples are equivalent. ### `--testRunner=` diff --git a/website/versioned_docs/version-26.x/CLI.md b/website/versioned_docs/version-26.x/CLI.md index e808f0af82aa..474a8fb4c430 100644 --- a/website/versioned_docs/version-26.x/CLI.md +++ b/website/versioned_docs/version-26.x/CLI.md @@ -321,9 +321,11 @@ Note that `column` is 0-indexed while `line` is not. A regexp pattern string that is matched against all tests paths before executing the test. On Windows, you will need to use `/` as a path separator or escape `\` as `\\`. -### `--testPathIgnorePatterns=[array]` +### `--testPathIgnorePatterns=|[array]` -An array of regexp pattern strings that are tested against all tests paths before executing the test. Contrary to `--testPathPattern`, it will only run those tests with a path that does not match with the provided regexp expressions. +A single or array of regexp pattern strings that are tested against all tests paths before executing the test. Contrary to `--testPathPattern`, it will only run those tests with a path that does not match with the provided regexp expressions. + +To pass as an array use escaped parentheses and space delimited regexps such as `\(/node_modules/ /tests/e2e/\)`. Alternatively, you can omit parentheses by combining regexps into a single regexp like `/node_modules/|/tests/e2e/`. These two examples are equivalent. ### `--testRunner=`