Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

jiv-e
Copy link

@jiv-e jiv-e commented Apr 24, 2017

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 ^

@facebook-github-bot
Copy link

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.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@Timer Timer added this to the 0.9.6 milestone Apr 25, 2017
@Timer Timer modified the milestones: 0.9.6, 1.0.1 May 17, 2017
@gaearon gaearon modified the milestones: 1.0.1, 1.0.x May 19, 2017
@@ -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:
Copy link
Contributor

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.

Copy link
Author

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't render very nicely. Please use GH Preview feature to test your changes. Thanks!
screen shot 2017-06-27 at 5 28 05 pm

Also added link to ejecting.
@Timer
Copy link
Contributor

Timer commented Jan 9, 2018

Documented via 1c8a7f3. Thanks for this!

@Timer Timer closed this Jan 9, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants