Skip to content
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

Better documentation for setupTests.js when ejecting #3656

Merged
merged 5 commits into from
Jan 9, 2018

Conversation

dannycalleri
Copy link
Contributor

When running npm run eject before creating src/setupTests.js, the resulting package.json file, won't contain any entry for it - and this is correct in my opinion, since otherwise Jest will crash - but it's useful to have it documented and avoid pointless waste of time.

When running `npm run eject` before creating `src/setupTests.js`, the resulting `package.json` file, won't contain any entry for it - and this is correct in my opinion, since otherwise Jest will crash - but it's useful to have it documented and avoid pointless waste of time.
@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. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

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

Timer commented Jan 9, 2018

Documented via 1c8a7f3.

Thanks!

@Timer Timer closed this Jan 9, 2018
@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

Ooh this is actually better than what I did. I didn’t look at the PR because it wasn’t linked to the issue.

@Timer Timer reopened this Jan 9, 2018
@dannycalleri
Copy link
Contributor Author

Hi @gaearon , thank you!
I actually mentioned you in one of the issues, even if I didn't referenced it from here, sorry.
Here's my comment on the issue mentioning you: #643 (comment)

@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

Ah, I see! Sorry, we generally don't read closed issues because there's just way too much information (it took me 10 hours yesterday to go through just the open ones).

@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

@dannycalleri I like your wording, do you think you could update this to find a middle ground between what you and what I did? Whatever makes most sense to you (I'm fine with deleting my wording, although I'd like to leave the mention in more than one place).

Added another note about src/setupTests.js and `npm run eject` in Testing Components section
@dannycalleri
Copy link
Contributor Author

Sure @gaearon , I already modified the README with another note in the same place as yours but using an anchor to the other, just to avoid repeating the code sample.
Let me know what you think, thanks

@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

(Please rebase on top of master)

@dannycalleri
Copy link
Contributor Author

Sorry @gaearon , I instinctively merged master in seeing the conflict, then I read your comment. How do you want to proceed?
Probably squashing with interactive rebasing on master will work, I don't know what you prefer.
Let me know if you need any more help

@gaearon gaearon merged commit 5a0b1ef into facebook:master Jan 9, 2018
@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

This looks good, thanks

@dannycalleri
Copy link
Contributor Author

Thank you @gaearon . Would love to help with other issues, can you point me to some other stuff?

@Timer Timer added this to the 1.0.18 milestone Jan 9, 2018
@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

It's a bit tricky because the repo is in a messy state: there's a bunch of different things we want to do and we haven't had time to address them properly. Keep tabs on #3672, we'll likely mention some next TODOs there.

Pavek pushed a commit to Pavek/create-react-app that referenced this pull request Jul 10, 2018
* Better documentation for setupTests.js when ejecting

When running `npm run eject` before creating `src/setupTests.js`, the resulting `package.json` file, won't contain any entry for it - and this is correct in my opinion, since otherwise Jest will crash - but it's useful to have it documented and avoid pointless waste of time.

* Added additional note about src/setupTests.js

Added another note about src/setupTests.js and `npm run eject` in Testing Components section

* Update README.md

* Update README.md
zmitry pushed a commit to zmitry/create-react-app that referenced this pull request Aug 14, 2018
* Better documentation for setupTests.js when ejecting

When running `npm run eject` before creating `src/setupTests.js`, the resulting `package.json` file, won't contain any entry for it - and this is correct in my opinion, since otherwise Jest will crash - but it's useful to have it documented and avoid pointless waste of time.

* Added additional note about src/setupTests.js

Added another note about src/setupTests.js and `npm run eject` in Testing Components section

* Update README.md

* Update README.md
@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.

None yet

4 participants