Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jest config): set notify to false in JEST_OVERRIDE_OPTIONS #1419

Merged
merged 1 commit into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/jest-runner/src/jestOverrideOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const JEST_OVERRIDE_OPTIONS = Object.freeze({

// Disable bail so the jest process does not quit with a non-zero exit code
bail: false,

// Disable notifications for test results, this will otherwise show a notification about
// the results each time Stryker runs the tests
notify: false
});

export default JEST_OVERRIDE_OPTIONS;
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe('Integration test for Jest ConfigEditor', () => {
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
'^react-native$': 'react-native-web'
},
notify: false,
rootDir: projectRoot,
setupFiles: [path.join(projectRoot, 'node_modules', 'react-app-polyfill', 'jsdom.js')],
setupTestFrameworkScriptFile: undefined,
Expand Down Expand Up @@ -107,6 +108,7 @@ describe('Integration test for Jest ConfigEditor', () => {
moduleNameMapper: {
'^react-native$': 'react-native-web'
},
notify: false,
rootDir: projectRoot,
setupFiles: [path.join(projectRoot, 'node_modules', 'react-scripts-ts', 'config', 'polyfills.js')],
setupTestFrameworkScriptFile: undefined,
Expand Down Expand Up @@ -142,6 +144,7 @@ describe('Integration test for Jest ConfigEditor', () => {
bail: false,
collectCoverage: false,
moduleFileExtensions: ['js', 'json', 'jsx', 'node'],
notify: false,
testEnvironment: 'jest-environment-jsdom',
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$',
testResultsProcessor: undefined,
Expand All @@ -161,6 +164,7 @@ describe('Integration test for Jest ConfigEditor', () => {
bail: false,
collectCoverage: false,
moduleFileExtensions: ['js', 'json', 'jsx', 'node'],
notify: false,
testEnvironment: 'jest-environment-jsdom',
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$',
testResultsProcessor: undefined,
Expand All @@ -178,6 +182,7 @@ describe('Integration test for Jest ConfigEditor', () => {
expect(config.jest.config).to.deep.equal({
bail: false,
collectCoverage: false,
notify: false,
testResultsProcessor: undefined,
verbose: false,
});
Expand Down
3 changes: 2 additions & 1 deletion packages/jest-runner/test/unit/JestConfigEditor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ describe('JestConfigEditor', () => {
assert(reactScriptsTSJestConfigLoaderStub.loadConfig.calledOnce, 'ReactScriptsTSJestConfigLoader loadConfig not called');
});

it('should override verbose, collectCoverage, testResultsProcessor and bail on all loaded configs', () => {
it('should override verbose, collectCoverage, testResultsProcessor, notify and bail on all loaded configs', () => {
sut.edit(config);

expect(config.jest.config).to.deep.equal({
bail: false,
collectCoverage: false,
notify: false,
testResultsProcessor: undefined,
verbose: false
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"testURL": "http://localhost",
"collectCoverage": true,
"verbose": true,
"bail": false
"bail": false,
"notify": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ module.exports = {
collectCoverage: true,
verbose: true,
testURL: "http://localhost",
bail: false
}
bail: false,
notify: true,
}