test: js/jsx page

This commit is contained in:
Clark Du 2017-12-11 16:18:28 +08:00
parent 4b841c7f2c
commit 844da3f1fe
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9
2 changed files with 12 additions and 0 deletions

View File

@ -245,6 +245,11 @@ test('/router-guard', async t => {
t.false(html.includes('Router Guard'))
})
test('/jsx', async t => {
const { html } = await nuxt.renderRoute('/jsx')
t.true(html.includes('<h1>JSX Page</h1>'))
})
// Close server and ask nuxt to stop listening to file changes
test.after('Closing server and nuxt.js', t => {
nuxt.close()

7
test/fixtures/basic/pages/jsx.js vendored Normal file
View File

@ -0,0 +1,7 @@
export default {
render() {
return <div class='container'>
<h1>JSX Page</h1>
</div>
}
}