mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
update tests
This commit is contained in:
parent
b6f2405e7e
commit
6a1fd757c6
15
test/fixtures/spa/pages/custom.vue
vendored
Normal file
15
test/fixtures/spa/pages/custom.vue
vendored
Normal 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>
|
1
test/fixtures/spa/pages/index.vue
vendored
1
test/fixtures/spa/pages/index.vue
vendored
@ -6,7 +6,6 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
layout: 'custom',
|
||||
mounted () {
|
||||
window.indexMounted = (+window.indexMounted) + 1
|
||||
console.log('mounted')
|
||||
|
@ -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'))
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user