-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Added details how to use setupTests.js after eject #2027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 [email protected]. 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 [email protected] 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! |
@@ -176,6 +176,11 @@ If you aren’t satisfied with the build tool and configuration choices, you can | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -1063,8 +1068,9 @@ and then use them in your tests like you normally do. | |||
### Initializing Test Environment | |||
|
|||
>Note: this feature is available with `[email protected]` and higher. | |||
>Note: After ejecting you need to manually add [setupTestFrameworkScriptFile](https://facebook.github.io/jest/docs/configuration.html#setuptestframeworkscriptfile-string) in package.json. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ^