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)
|
||||
|
||||
### 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
|
||||
|
||||
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)
|
||||
|
||||
### 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
|
||||
|
||||
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)
|
||||
|
||||
### 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
|
||||
|
||||
Type: `array`
|
||||
|
||||
@ -181,6 +181,7 @@ describe('Jest Executor', () => {
|
||||
showConfig: true,
|
||||
silent: true,
|
||||
testNamePattern: 'test',
|
||||
testPathIgnorePatterns: ['/test/path/|/tests/e2e/'],
|
||||
testPathPattern: ['/test/path'],
|
||||
colors: false,
|
||||
reporters: ['/test/path'],
|
||||
@ -212,6 +213,7 @@ describe('Jest Executor', () => {
|
||||
showConfig: true,
|
||||
silent: true,
|
||||
testNamePattern: 'test',
|
||||
testPathIgnorePatterns: ['/test/path/|/tests/e2e/'],
|
||||
testPathPattern: ['/test/path'],
|
||||
colors: false,
|
||||
verbose: false,
|
||||
|
||||
@ -57,6 +57,7 @@ export async function jestConfigParser(
|
||||
testLocationInResults: options.testLocationInResults,
|
||||
testNamePattern: options.testNamePattern,
|
||||
testPathPattern: options.testPathPattern,
|
||||
testPathIgnorePatterns: options.testPathIgnorePatterns,
|
||||
testTimeout: options.testTimeout,
|
||||
colors: options.colors,
|
||||
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;
|
||||
silent?: boolean;
|
||||
testNamePattern?: string;
|
||||
testPathIgnorePatterns?: string[];
|
||||
testPathPattern?: string[];
|
||||
colors?: boolean;
|
||||
reporters?: string[];
|
||||
|
||||
@ -101,6 +101,13 @@
|
||||
"description": "Run only tests with a name that matches the regex pattern. (https://jestjs.io/docs/cli#--testnamepatternregex)",
|
||||
"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": {
|
||||
"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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user