Skip to content

Instantly share code, notes, and snippets.

@viclotana
Created February 17, 2019 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viclotana/e4801eff4dff4dd777999578640a5fa7 to your computer and use it in GitHub Desktop.
Save viclotana/e4801eff4dff4dd777999578640a5fa7 to your computer and use it in GitHub Desktop.
import React from 'react'
import styled from 'styled-components'
import renderer from 'react-test-renderer'
import 'jest-styled-components'
const Button = styled.button`
color: red;
`
test('it works', () => {
const tree = renderer.create(<Button />).toJSON()
expect(tree).toMatchSnapshot()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment