feat(testing): added --showConfig CLI option to Jest package (#2968)

This commit is contained in:
Ross Knudsen 2020-05-09 05:39:07 +12:00 committed by GitHub
parent ac6f52a5a5
commit 41572b3afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 0 deletions

View File

@ -136,6 +136,12 @@ Type: `string`
The name of a setup file used by Jest. (https://jestjs.io/docs/en/configuration#setupfilesafterenv-array)
### showConfig
Type: `boolean`
Print your Jest config and then exits. (https://jestjs.io/docs/en/cli#--showconfig)
### silent
Type: `boolean`

View File

@ -137,6 +137,12 @@ Type: `string`
The name of a setup file used by Jest. (https://jestjs.io/docs/en/configuration#setupfilesafterenv-array)
### showConfig
Type: `boolean`
Print your Jest config and then exits. (https://jestjs.io/docs/en/cli#--showconfig)
### silent
Type: `boolean`

View File

@ -182,6 +182,7 @@ describe('Jest Builder', () => {
onlyChanged: true,
outputFile: 'abc.txt',
passWithNoTests: true,
showConfig: true,
silent: true,
testNamePattern: 'test',
testPathPattern: ['/test/path'],
@ -225,6 +226,7 @@ describe('Jest Builder', () => {
onlyChanged: true,
outputFile: 'abc.txt',
passWithNoTests: true,
showConfig: true,
silent: true,
testNamePattern: 'test',
testPathPattern: ['/test/path'],

View File

@ -81,6 +81,7 @@ function run(
outputFile: options.outputFile,
passWithNoTests: options.passWithNoTests,
runInBand: options.runInBand,
showConfig: options.showConfig,
silent: options.silent,
testLocationInResults: options.testLocationInResults,
testNamePattern: options.testNamePattern,

View File

@ -19,6 +19,7 @@ export interface JestBuilderOptions extends JsonObject {
outputFile?: string;
passWithNoTests?: boolean;
runInBand?: boolean;
showConfig?: boolean;
silent?: boolean;
testNamePattern?: string;
testPathPattern?: string[];

View File

@ -80,6 +80,10 @@
"description": "Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI. (https://jestjs.io/docs/en/cli#runinband)",
"type": "boolean"
},
"showConfig": {
"description": "Print your Jest config and then exits. (https://jestjs.io/docs/en/cli#--showconfig)",
"type": "boolean"
},
"silent": {
"description": "Prevent tests from printing messages through the console. (https://jestjs.io/docs/en/cli#silent)",
"type": "boolean"