Skip to content

Instantly share code, notes, and snippets.

@johnfkneafsey
Created January 18, 2017 13:08
Show Gist options
  • Save johnfkneafsey/e9ee50bb4bd217f04e2d1191e7a8c3d8 to your computer and use it in GitHub Desktop.
Save johnfkneafsey/e9ee50bb4bd217f04e2d1191e7a8c3d8 to your computer and use it in GitHub Desktop.
1.) What is shallow rendering and why is it useful for testing React?
Shallow rendering is useful when testing in React because it allows to you ensure that you are testing a single component individually and not its children components.
2.) What aspects of a React Component can you test using shallow rendering?
-type
-props (src, alt, etc.)
-user events
-responses to user events
3.) Which features of a component should you test?
Same as above?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment