import { shallow } from 'enzyme'; import React from 'react'; import renderer from 'react-test-renderer'; import Button from '../button'; describe('); const tree = component.toJSON(); expect(tree).toMatchSnapshot(); }); it('renders the props.text instead of children', () => { const text = 'foo'; const children =

children

; const component = renderer.create(); const tree = component.toJSON(); expect(tree).toMatchSnapshot(); }); it('renders class="button--block" if props.block given', () => { const component = renderer.create(