Added details how to use setupTests.js after eject#2027
Added details how to use setupTests.js after eject#2027jiv-e wants to merge 2 commits intofacebook:masterfrom
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
|
||
| Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. | ||
|
|
||
| Ejecting removes some automatic functionality like: |
There was a problem hiding this comment.
I'm not very happy with this wording. Let's just mention this next to particular features. The way you did it below is fine.
There was a problem hiding this comment.
Yes, this was a sketch and wording could be improved. I was just thinking it would be beneficial to list the known changes in functionality in one place. It would make it easier to understand the effects of ejecting.
| ### Initializing Test Environment | ||
|
|
||
| >Note: this feature is available with `react-scripts@0.4.0` and higher. | ||
| >Note: After ejecting you need to manually add [setupTestFrameworkScriptFile](https://facebook.github.io/jest/docs/configuration.html#setuptestframeworkscriptfile-string) in package.json. |
Also added link to ejecting.
|
Documented via 1c8a7f3. Thanks for this! |

As discussed in #2007, documentation could include information how ejecting affects on otherwise automatic features. This allows to utilize the documentation better after ejecting.
This pull request is sketchy because I don't know how ejecting affects other features than src/setupTests.js. It would be great if you could provide more details.
@anilreddykatta ^