Created
December 8, 2017 21:23
-
-
Save alanbsmith/bf9fda4d90c49c2956a7dad72c298537 to your computer and use it in GitHub Desktop.
effective-testing-for-styled-components-simple-snapshot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import Button from '../index'; | |
| import renderer from 'react-test-renderer'; | |
| describe('Button Block', () => { | |
| it('renders correctly', () => { | |
| const tree = renderer | |
| .create(<Button>Submit</Button>) | |
| .toJSON(); | |
| expect(tree).toMatchSnapshot(); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment