feat(builders): add bail and silent options to jest
This commit is contained in:
parent
f960d5aba2
commit
817691d38d
@ -67,7 +67,9 @@ describe('Jest Builder', () => {
|
||||
ci: true,
|
||||
updateSnapshot: true,
|
||||
onlyChanged: true,
|
||||
passWithNoTests: true
|
||||
passWithNoTests: true,
|
||||
bail: true,
|
||||
silent: true
|
||||
}
|
||||
})
|
||||
.toPromise();
|
||||
@ -84,7 +86,9 @@ describe('Jest Builder', () => {
|
||||
ci: true,
|
||||
updateSnapshot: true,
|
||||
onlyChanged: true,
|
||||
passWithNoTests: true
|
||||
passWithNoTests: true,
|
||||
bail: true,
|
||||
silent: true
|
||||
},
|
||||
['./jest.config.js']
|
||||
);
|
||||
|
||||
@ -15,11 +15,13 @@ export interface JestBuilderOptions {
|
||||
jestConfig: string;
|
||||
tsConfig: string;
|
||||
watch: boolean;
|
||||
bail?: boolean;
|
||||
ci?: boolean;
|
||||
codeCoverage?: boolean;
|
||||
onlyChanged?: boolean;
|
||||
passWithNoTests?: boolean;
|
||||
setupFile?: string;
|
||||
silent?: boolean;
|
||||
updateSnapshot?: boolean;
|
||||
}
|
||||
|
||||
@ -31,10 +33,12 @@ export default class JestBuilder implements Builder<JestBuilderOptions> {
|
||||
const config: any = {
|
||||
watch: options.watch,
|
||||
coverage: options.codeCoverage,
|
||||
bail: options.bail,
|
||||
ci: options.ci,
|
||||
updateSnapshot: options.updateSnapshot,
|
||||
onlyChanged: options.onlyChanged,
|
||||
passWithNoTests: options.passWithNoTests,
|
||||
silent: options.silent,
|
||||
globals: JSON.stringify({
|
||||
'ts-jest': {
|
||||
tsConfigFile: path.relative(builderConfig.root, options.tsConfig)
|
||||
|
||||
@ -49,6 +49,16 @@
|
||||
"type": "boolean",
|
||||
"description":
|
||||
"Fail on missing snapshots. (https://jestjs.io/docs/en/cli#ci)"
|
||||
},
|
||||
"bail": {
|
||||
"type": "boolean",
|
||||
"description":
|
||||
"Exit the test suite immediately upon the first failing test suite. (https://jestjs.io/docs/en/cli#bail)"
|
||||
},
|
||||
"silent": {
|
||||
"type": "boolean",
|
||||
"description":
|
||||
"Prevent tests from printing messages through the console. (https://jestjs.io/docs/en/cli#silent)"
|
||||
}
|
||||
},
|
||||
"required": ["jestConfig", "tsConfig"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user