-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jest-config): override jest config (#34)
Override config options like bail, code coverage and verbosity for performance reasons.
- Loading branch information
Showing
12 changed files
with
97 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const JEST_OVERRIDE_OPTIONS = Object.freeze({ | ||
// Prevent the user from using his or her own testResultProcessor because this might | ||
// Mess with the way Stryker gets the results | ||
testResultsProcessor: undefined, | ||
|
||
// Disable code coverage, it is not used in Stryker and will only slow down the test runs | ||
collectCoverage: false, | ||
|
||
// Disable verbose logging, this will only slow down Stryker test runs | ||
verbose: false, | ||
|
||
// Enable bail so the process quits immediately when one of the tests fails | ||
bail: true, | ||
}); | ||
|
||
export default JEST_OVERRIDE_OPTIONS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/stryker-jest-runner/testResources/exampleProject/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...ges/stryker-jest-runner/testResources/exampleProjectWithExplicitJestConfig/jest.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
module.exports = { | ||
collectCoverage: false, | ||
moduleFileExtensions: ["js", "json", "jsx", "node"], | ||
testEnvironment: "jest-environment-jsdom", | ||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$", | ||
testRunner: "jest-jasmine2", | ||
verbose: true | ||
testResultsProcessor: "my-awesome-testResultProcessor", | ||
collectCoverage: true, | ||
verbose: true, | ||
bail: false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters