import test from 'ava' import { join } from 'path' import build from '../server/build' import { render as _render } from '../server/render' const dir = join(__dirname, 'fixtures', 'basic') test.before(() => build(dir)) test('renders a stateless component', async t => { const html = await render('/stateless') t.true(html.includes('')) t.true(html.includes('
The answer is 42
Diego Milito
')) }) test('renders a link component', async t => { const html = await render('/link') t.true(html.includes('About')) }) function render (url, ctx) { return _render(url, ctx, { dir, staticMarkup: true }) }