From 1c8a7f3fecc60cd1516ed3a28f274945de90b3db Mon Sep 17 00:00:00 2001
From: Dan Abramov <dan.abramov@gmail.com>
Date: Mon, 8 Jan 2018 23:48:06 +0000
Subject: [PATCH] Document that src/setupTests.js doesn't work if created after
 ejecting

---
 packages/react-scripts/template/README.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md
index 4e4623ab5..989e3e388 100644
--- a/packages/react-scripts/template/README.md
+++ b/packages/react-scripts/template/README.md
@@ -1323,6 +1323,8 @@ import Adapter from 'enzyme-adapter-react-16';
 configure({ adapter: new Adapter() });
 ```
 
+(Note that **if you already ejected** before creating `src/setupTests.js`, this won’t work unless you set [this Jest option](https://facebook.github.io/jest/docs/en/configuration.html#setuptestframeworkscriptfile-string) to point to `src/setupTests.js`.)
+
 Now you can write a smoke test with it:
 
 ```js
@@ -1412,6 +1414,8 @@ const localStorageMock = {
 global.localStorage = localStorageMock
 ```
 
+Note that **if you already ejected** before creating `src/setupTests.js`, this won’t work unless you set [this Jest option](https://facebook.github.io/jest/docs/en/configuration.html#setuptestframeworkscriptfile-string) to point to `src/setupTests.js`.
+
 ### Focusing and Excluding Tests
 
 You can replace `it()` with `xit()` to temporarily exclude a test from being executed.<br>
-- 
GitLab