feat(testing): add --testPathIgnorePatterns flag support (#7478)
closes #7462 Co-authored-by: Matt <MattGson>
This commit is contained in:
parent
36a81b7c04
commit
965b11679f
@ -176,6 +176,12 @@ Type: `string`
|
|||||||
|
|
||||||
Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)
|
Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)
|
||||||
|
|
||||||
|
### testPathIgnorePatterns
|
||||||
|
|
||||||
|
Type: `array`
|
||||||
|
|
||||||
|
An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)
|
||||||
|
|
||||||
### testPathPattern
|
### testPathPattern
|
||||||
|
|
||||||
Type: `array`
|
Type: `array`
|
||||||
|
|||||||
@ -176,6 +176,12 @@ Type: `string`
|
|||||||
|
|
||||||
Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)
|
Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)
|
||||||
|
|
||||||
|
### testPathIgnorePatterns
|
||||||
|
|
||||||
|
Type: `array`
|
||||||
|
|
||||||
|
An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)
|
||||||
|
|
||||||
### testPathPattern
|
### testPathPattern
|
||||||
|
|
||||||
Type: `array`
|
Type: `array`
|
||||||
|
|||||||
@ -176,6 +176,12 @@ Type: `string`
|
|||||||
|
|
||||||
Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)
|
Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)
|
||||||
|
|
||||||
|
### testPathIgnorePatterns
|
||||||
|
|
||||||
|
Type: `array`
|
||||||
|
|
||||||
|
An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)
|
||||||
|
|
||||||
### testPathPattern
|
### testPathPattern
|
||||||
|
|
||||||
Type: `array`
|
Type: `array`
|
||||||
|
|||||||
@ -181,6 +181,7 @@ describe('Jest Executor', () => {
|
|||||||
showConfig: true,
|
showConfig: true,
|
||||||
silent: true,
|
silent: true,
|
||||||
testNamePattern: 'test',
|
testNamePattern: 'test',
|
||||||
|
testPathIgnorePatterns: ['/test/path/|/tests/e2e/'],
|
||||||
testPathPattern: ['/test/path'],
|
testPathPattern: ['/test/path'],
|
||||||
colors: false,
|
colors: false,
|
||||||
reporters: ['/test/path'],
|
reporters: ['/test/path'],
|
||||||
@ -212,6 +213,7 @@ describe('Jest Executor', () => {
|
|||||||
showConfig: true,
|
showConfig: true,
|
||||||
silent: true,
|
silent: true,
|
||||||
testNamePattern: 'test',
|
testNamePattern: 'test',
|
||||||
|
testPathIgnorePatterns: ['/test/path/|/tests/e2e/'],
|
||||||
testPathPattern: ['/test/path'],
|
testPathPattern: ['/test/path'],
|
||||||
colors: false,
|
colors: false,
|
||||||
verbose: false,
|
verbose: false,
|
||||||
|
|||||||
@ -57,6 +57,7 @@ export async function jestConfigParser(
|
|||||||
testLocationInResults: options.testLocationInResults,
|
testLocationInResults: options.testLocationInResults,
|
||||||
testNamePattern: options.testNamePattern,
|
testNamePattern: options.testNamePattern,
|
||||||
testPathPattern: options.testPathPattern,
|
testPathPattern: options.testPathPattern,
|
||||||
|
testPathIgnorePatterns: options.testPathIgnorePatterns,
|
||||||
testTimeout: options.testTimeout,
|
testTimeout: options.testTimeout,
|
||||||
colors: options.colors,
|
colors: options.colors,
|
||||||
verbose: options.verbose,
|
verbose: options.verbose,
|
||||||
|
|||||||
1
packages/jest/src/executors/jest/schema.d.ts
vendored
1
packages/jest/src/executors/jest/schema.d.ts
vendored
@ -20,6 +20,7 @@ export interface JestExecutorOptions {
|
|||||||
showConfig?: boolean;
|
showConfig?: boolean;
|
||||||
silent?: boolean;
|
silent?: boolean;
|
||||||
testNamePattern?: string;
|
testNamePattern?: string;
|
||||||
|
testPathIgnorePatterns?: string[];
|
||||||
testPathPattern?: string[];
|
testPathPattern?: string[];
|
||||||
colors?: boolean;
|
colors?: boolean;
|
||||||
reporters?: string[];
|
reporters?: string[];
|
||||||
|
|||||||
@ -101,6 +101,13 @@
|
|||||||
"description": "Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)",
|
"description": "Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"testPathIgnorePatterns": {
|
||||||
|
"description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions. (https://jestjs.io/docs/cli#--testpathignorepatternsregexarray)",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
"testPathPattern": {
|
"testPathPattern": {
|
||||||
"description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. (https://jestjs.io/docs/cli#--testpathpatternregex)",
|
"description": "An array of regexp pattern strings that is matched against all tests paths before executing the test. (https://jestjs.io/docs/cli#--testpathpatternregex)",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user