diff --git a/test/basic.test.js b/test/basic.test.js index b720fd3b82..103423f686 100755 --- a/test/basic.test.js +++ b/test/basic.test.js @@ -56,6 +56,16 @@ test('/async-data', async t => { t.true(html.includes('

Nuxt.js

')) }) +test('/await-async-data', async t => { + const { html } = await nuxt.renderRoute('/await-async-data') + t.true(html.includes('

Await Nuxt.js

')) +}) + +test('/callback-async-data', async t => { + const { html } = await nuxt.renderRoute('/callback-async-data') + t.true(html.includes('

Callback Nuxt.js

')) +}) + test('/users/1', async t => { const { html } = await nuxt.renderRoute('/users/1') t.true(html.includes('

User: 1

')) diff --git a/test/fixtures/basic/pages/await-async-data.vue b/test/fixtures/basic/pages/await-async-data.vue new file mode 100644 index 0000000000..dbe80fac14 --- /dev/null +++ b/test/fixtures/basic/pages/await-async-data.vue @@ -0,0 +1,17 @@ + + + diff --git a/test/fixtures/basic/pages/callback-async-data.vue b/test/fixtures/basic/pages/callback-async-data.vue new file mode 100644 index 0000000000..03194c28fd --- /dev/null +++ b/test/fixtures/basic/pages/callback-async-data.vue @@ -0,0 +1,13 @@ + + +