update tests

This commit is contained in:
Pooya Parsa 2017-06-14 00:45:06 +04:30
parent f3ecfb6a92
commit b79f845842
2 changed files with 3 additions and 2 deletions

View File

@ -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',

View File

@ -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')
}) })