From 7c26a9feeac02a4b48365035d144367f2cec137a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E7=AB=8B=E9=9D=92?= Date: Wed, 29 Jan 2020 12:15:51 +0800 Subject: [PATCH 1/2] setupTestFrameworkScriptFile is deprecated __Note:_ `_setupTestFrameworkScriptFile_` _is deprecated in favor of_ `_setupFilesAfterEnv_`_.__ ref: https://jestjs.io/docs/en/configuration#setupfilesafterenv-array --- docusaurus/docs/running-tests.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docusaurus/docs/running-tests.md b/docusaurus/docs/running-tests.md index f416b64d33f..7851cc02d9e 100644 --- a/docusaurus/docs/running-tests.md +++ b/docusaurus/docs/running-tests.md @@ -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": "/src/setupTests.js" +> "setupFilesAfterEnv": "/src/setupTests.js" > } > ``` From 8a2c3451f78aa73c659a3ce7b2b55a1aa6a0d6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E7=AB=8B=E9=9D=92?= Date: Fri, 31 Jan 2020 17:25:47 +0800 Subject: [PATCH 2/2] Update docusaurus/docs/running-tests.md Co-Authored-By: Simen Bekkhus --- docusaurus/docs/running-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/running-tests.md b/docusaurus/docs/running-tests.md index 7851cc02d9e..7b81c1d2340 100644 --- a/docusaurus/docs/running-tests.md +++ b/docusaurus/docs/running-tests.md @@ -250,7 +250,7 @@ global.localStorage = localStorageMock; > ```js > "jest": { > // ... -> "setupFilesAfterEnv": "/src/setupTests.js" +> "setupFilesAfterEnv": ["/src/setupTests.js"] > } > ```