mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
Add test for layout with dash
This commit is contained in:
parent
8efe07f27e
commit
86fba7ae77
6
test/fixtures/with-config/layouts/custom-env.vue
vendored
Normal file
6
test/fixtures/with-config/layouts/custom-env.vue
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Custom env layout</h1>
|
||||
<nuxt/>
|
||||
</div>
|
||||
</template>
|
1
test/fixtures/with-config/pages/env.vue
vendored
1
test/fixtures/with-config/pages/env.vue
vendored
@ -4,6 +4,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
layout: 'custom-env',
|
||||
data ({ env }) {
|
||||
return { env }
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ test('/test/about (custom layout)', async t => {
|
||||
test('/test/env', async t => {
|
||||
const window = await nuxt.renderAndGetWindow(url('/test/env'))
|
||||
const html = window.document.body.innerHTML
|
||||
t.true(html.includes('<h1>Custom env layout</h1>'))
|
||||
t.true(html.includes('"bool": true'))
|
||||
t.true(html.includes('"num": 23'))
|
||||
t.true(html.includes('"string": "Nuxt.js"'))
|
||||
|
Loading…
Reference in New Issue
Block a user