Skip to content

Commit

Permalink
feat: add additional Jest keys to whitelist (#7832)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmckeb authored Oct 16, 2019
1 parent 584e352 commit 2da645c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,11 @@ The default Jest coverage configuration can be overridden by adding any of the f
Supported overrides:
- [`clearMocks`](https://jestjs.io/docs/en/configuration.html#clearmocks-boolean)
- [`collectCoverageFrom`](https://jestjs.io/docs/en/configuration.html#collectcoveragefrom-array)
- [`coverageReporters`](https://jestjs.io/docs/en/configuration.html#coveragereporters-array-string)
- [`coverageThreshold`](https://jestjs.io/docs/en/configuration.html#coveragethreshold-object)
- [`displayName`](https://jestjs.io/docs/en/configuration.html#displayname-string-object)
- [`extraGlobals`](https://jestjs.io/docs/en/configuration.html#extraglobals-array-string)
- [`globalSetup`](https://jestjs.io/docs/en/configuration.html#globalsetup-string)
- [`globalTeardown`](https://jestjs.io/docs/en/configuration.html#globalteardown-string)
Expand Down
4 changes: 3 additions & 1 deletion packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ module.exports = (resolve, rootDir, isEjecting) => {
}
const overrides = Object.assign({}, require(paths.appPackageJson).jest);
const supportedKeys = [
'clearMocks',
'collectCoverageFrom',
'coveragePathIgnorePatterns',
'coverageReporters',
'coverageThreshold',
'coveragePathIgnorePatterns',
'displayName',
'extraGlobals',
'globalSetup',
'globalTeardown',
Expand Down

0 comments on commit 2da645c

Please sign in to comment.