Skip to content

Commit 2da645c

Browse files
authored
feat: add additional Jest keys to whitelist (facebook#7832)
1 parent 584e352 commit 2da645c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docusaurus/docs/running-tests.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,11 @@ The default Jest coverage configuration can be overridden by adding any of the f
276276
277277
Supported overrides:
278278
279+
- [`clearMocks`](https://jestjs.io/docs/en/configuration.html#clearmocks-boolean)
279280
- [`collectCoverageFrom`](https://jestjs.io/docs/en/configuration.html#collectcoveragefrom-array)
280281
- [`coverageReporters`](https://jestjs.io/docs/en/configuration.html#coveragereporters-array-string)
281282
- [`coverageThreshold`](https://jestjs.io/docs/en/configuration.html#coveragethreshold-object)
283+
- [`displayName`](https://jestjs.io/docs/en/configuration.html#displayname-string-object)
282284
- [`extraGlobals`](https://jestjs.io/docs/en/configuration.html#extraglobals-array-string)
283285
- [`globalSetup`](https://jestjs.io/docs/en/configuration.html#globalsetup-string)
284286
- [`globalTeardown`](https://jestjs.io/docs/en/configuration.html#globalteardown-string)

packages/react-scripts/scripts/utils/createJestConfig.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ module.exports = (resolve, rootDir, isEjecting) => {
7171
}
7272
const overrides = Object.assign({}, require(paths.appPackageJson).jest);
7373
const supportedKeys = [
74+
'clearMocks',
7475
'collectCoverageFrom',
76+
'coveragePathIgnorePatterns',
7577
'coverageReporters',
7678
'coverageThreshold',
77-
'coveragePathIgnorePatterns',
79+
'displayName',
7880
'extraGlobals',
7981
'globalSetup',
8082
'globalTeardown',

0 commit comments

Comments
 (0)