import { h } from 'preact'; import render from 'preact-render-to-json'; import { shallow } from 'preact-render-spy'; import { Close } from '../Close'; describe('', () => { it('renders properly', () => { const tree = render(); expect(tree).toMatchSnapshot(); }); it('shows the modal', () => { const container = shallow(); expect(container.find('.crayons-article-form__close').exists()).toEqual( true, ); }); });