test: fix appveyor

part 2!
This commit is contained in:
Pooya Parsa 2017-05-31 17:36:23 +04:30
parent 3de7921b5a
commit d161a5785c

View File

@ -8,6 +8,8 @@ const url = (route) => 'http://localhost:' + port + route
let nuxt = null let nuxt = null
let server = null let server = null
const wp = p => /^win/.test(process.platform) ? p.replace(/[\\/]/g, '\\\\') : p
// Init nuxt.js and create server listening on localhost:4000 // Init nuxt.js and create server listening on localhost:4000
test.before('Init Nuxt.js', async t => { test.before('Init Nuxt.js', async t => {
const Nuxt = require('../') const Nuxt = require('../')
@ -26,7 +28,7 @@ test('Vendor', async t => {
}) })
test('Plugin', async t => { test('Plugin', async t => {
t.true(nuxt.options.plugins[0].src.includes('~/.nuxt/basic.reverse.'), 'plugin added to config') t.true(nuxt.options.plugins[0].src.includes(wp('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')
}) })