/* eslint-env jest */ import { h, Component, render } from 'preact'; import App from '../../src/components/app'; describe('', () => { let scratch; beforeEach(() => { scratch = document.createElement('div'); document.body.appendChild(scratch); }); afterEach(() => { render(, scratch, scratch.firstChild); scratch.remove(); }); it('should render', () => { let app; render( { app = c; }} />, scratch); expect(app instanceof Component).toBe(true); expect(scratch.innerHTML).toBe( `

Select an image

` ); }); });