Skip to content

Commit 0db04ec

Browse files
JimmyLvSimenB
andauthored
setupTestFrameworkScriptFile is deprecated (#8390)
* 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 <sbekkhus91@gmail.com> Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
1 parent 325e599 commit 0db04ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docusaurus/docs/running-tests.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,12 @@ const localStorageMock = {
245245
global.localStorage = localStorageMock;
246246
```
247247

248-
> 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:
248+
> 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:
249249
250250
> ```js
251251
> "jest": {
252252
> // ...
253-
> "setupTestFrameworkScriptFile": "<rootDir>/src/setupTests.js"
253+
> "setupFilesAfterEnv": ["<rootDir>/src/setupTests.js"]
254254
> }
255255
> ```
256256

0 commit comments

Comments
 (0)