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('{{ name }}
+ + + 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 @@ + +{{ name }}
+ + +