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

Update TutorialReact.md #5949

Merged
merged 5 commits into from
Apr 9, 2018
Merged

Conversation

atomcorp
Copy link
Contributor

@atomcorp atomcorp commented Apr 9, 2018

The current docs imply you can use Jest snapshots with create-react-app 'out-the-box', however the Snapshot Testing example doesn't work with a fresh install. You need to additionally install react-test-renderer as a dependency.

I thought it was more helpful to change the docs, but if it's better to raise the issue elsewhere let me know!

Summary

The docs are a little confusing. It literally says Create React App works without any additional configuration, however one of the examples provided doesn't work without additional configuaration.

Test plan

I did a fresh install of the latest create-react-app, created the Link.react.app and Link.react.test.js from the docs example and tried to run the tests. It fails unless you add 'react-test-renderer'.

atomcorp added 2 commits April 9, 2018 12:36
The current docs imply you can use Jest snapshots with create-react-app 'out-the-box', however the Snapshot Testing example doesn't work with a fresh install. You need to additionally install `react-test-renderer` as a dependency.

I thought it was more helpful to change the docs, but if it's better to raise the issue elsewhere let me know?!
The current docs imply you can use Jest snapshots with create-react-app 'out-the-box', however the Snapshot Testing example doesn't work with a fresh install. You need to additionally install `react-test-renderer` as a dependency.

I thought it was more helpful to change the docs, but if it's better to raise the issue elsewhere let me know?!
@facebook-github-bot
Copy link
Contributor

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 [email protected]. Thanks!

@facebook-github-bot
Copy link
Contributor

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

@rickhanlonii
Copy link
Member

Looks good, @atomcorp can you run yarn lint:md

@atomcorp
Copy link
Contributor Author

atomcorp commented Apr 9, 2018

Thanks for the swift reply!
I'm having some issues with Yarn and running tests (same as this: #5738 (comment)). I'll have to try it on another PC later and try and narrow down my issue.

@SimenB
Copy link
Member

SimenB commented Apr 9, 2018

You don't need to run the tests for a documentation change. Can you make sure to run yarn lint:md, though 🙂

@atomcorp
Copy link
Contributor Author

atomcorp commented Apr 9, 2018

Fair enough! I was hoping to check before pushing broken commits :(

I did run yarn lint:md however, it didn't seem to change anything though...

@codecov-io
Copy link

Codecov Report

Merging #5949 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5949   +/-   ##
=======================================
  Coverage   64.39%   64.39%           
=======================================
  Files         217      217           
  Lines        8274     8274           
  Branches        3        4    +1     
=======================================
  Hits         5328     5328           
  Misses       2945     2945           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6ae2cb...ae50c89. Read the comment docs.

@rickhanlonii rickhanlonii merged commit 5a21be3 into jestjs:master Apr 9, 2018
@rickhanlonii
Copy link
Member

Thanks!

@atomcorp
Copy link
Contributor Author

atomcorp commented Apr 9, 2018

Haha, OK guess I didn't yarn lint:md! Thanks guys!

@atomcorp atomcorp deleted the dep-docs-fix-1 branch April 12, 2018 21:30
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
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.

6 participants