update tests

This commit is contained in:
Pooya Parsa 2017-10-07 18:54:15 +03:30
parent b6f2405e7e
commit 6a1fd757c6
3 changed files with 17 additions and 4 deletions

15
test/fixtures/spa/pages/custom.vue vendored Normal file
View File

@ -0,0 +1,15 @@
<template>
<div>
Hello SPA!
</div>
</template>
<script>
export default {
layout: 'custom',
mounted () {
window.customMounted = (+window.customMounted) + 1
console.log('mounted')
}
}
</script>

View File

@ -6,7 +6,6 @@
<script>
export default {
layout: 'custom',
mounted () {
window.indexMounted = (+window.indexMounted) + 1
console.log('mounted')

View File

@ -1,5 +1,4 @@
import test from 'ava'
import { resolve } from 'path'
import { Nuxt, Builder } from '../index.js'
let nuxt = null
@ -25,8 +24,8 @@ test('/ (basic spa)', async t => {
t.true(html.includes('Hello SPA!'))
})
test('/ (custom layout)', async t => {
const { html } = await renderRoute('/')
test.failing('/ (custom layout)', async t => {
const { html } = await renderRoute('/custom')
t.true(html.includes('Custom layout'))
})