mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
update tests
This commit is contained in:
parent
f3ecfb6a92
commit
b79f845842
@ -2,7 +2,7 @@ const path = require('path')
|
|||||||
|
|
||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
// Disable parsing pages/
|
// Disable parsing pages/
|
||||||
this.nuxt.createRoutes = () => {}
|
this.nuxt.options.build.createRoutes = () => {}
|
||||||
// Add /api endpoint
|
// Add /api endpoint
|
||||||
this.addTemplate({
|
this.addTemplate({
|
||||||
fileName: 'router.js',
|
fileName: 'router.js',
|
||||||
|
@ -26,7 +26,8 @@ test('Vendor', async t => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('Plugin', async t => {
|
test('Plugin', async t => {
|
||||||
t.true(nuxt.options.plugins[0].src.includes(normalize('fixtures/module/.nuxt/basic.reverse.')), 'plugin added to config')
|
t.true(normalize(nuxt.options.plugins[0].src)
|
||||||
|
.includes(normalize('fixtures/module/.nuxt/basic.reverse.')), 'plugin added to config')
|
||||||
const { html } = await nuxt.renderRoute('/')
|
const { html } = await nuxt.renderRoute('/')
|
||||||
t.true(html.includes('<h1>TXUN</h1>'), 'plugin works')
|
t.true(html.includes('<h1>TXUN</h1>'), 'plugin works')
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user