Skip to content

Commit

Permalink
setupTestFrameworkScriptFile is deprecated (#8390)
Browse files Browse the repository at this point in the history
* setupTestFrameworkScriptFile is deprecated

__Note:_ `_setupTestFrameworkScriptFile_` _is deprecated in favor of_ `_setupFilesAfterEnv_`_.__

ref: https://jestjs.io/docs/en/configuration#setupfilesafterenv-array

* Update docusaurus/docs/running-tests.md

Co-Authored-By: Simen Bekkhus <[email protected]>

Co-authored-by: Simen Bekkhus <[email protected]>
  • Loading branch information
JimmyLv and SimenB authored Jan 31, 2020
1 parent 325e599 commit 0db04ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ const localStorageMock = {
global.localStorage = localStorageMock;
```

> Note: Keep in mind that if you decide to "eject" before creating `src/setupTests.js`, the resulting `package.json` file won't contain any reference to it, so you should manually create the property `setupTestFrameworkScriptFile` in the configuration for Jest, something like the following:
> Note: Keep in mind that if you decide to "eject" before creating `src/setupTests.js`, the resulting `package.json` file won't contain any reference to it, so you should manually create the property `setupFilesAfterEnv` in the configuration for Jest, something like the following:
> ```js
> "jest": {
> // ...
> "setupTestFrameworkScriptFile": "<rootDir>/src/setupTests.js"
> "setupFilesAfterEnv": ["<rootDir>/src/setupTests.js"]
> }
> ```
Expand Down

0 comments on commit 0db04ec

Please sign in to comment.