fix: test failure

This commit is contained in:
Clark Du 2018-01-23 13:25:43 +08:00
parent 63f9773aea
commit 11c1dff5f3
No known key found for this signature in database
GPG Key ID: D0E5986AF78B86D9

View File

@ -11,6 +11,7 @@ let nuxt = null
// Init nuxt.js and create server listening on localhost:4000 // Init nuxt.js and create server listening on localhost:4000
test.serial('Init Nuxt.js', async t => { test.serial('Init Nuxt.js', async t => {
process.env.NODE_ENV = 'development'
const rootDir = resolve(__dirname, 'fixtures/debug') const rootDir = resolve(__dirname, 'fixtures/debug')
let config = require(resolve(rootDir, 'nuxt.config.js')) let config = require(resolve(rootDir, 'nuxt.config.js'))
config.rootDir = rootDir config.rootDir = rootDir
@ -100,5 +101,6 @@ test.serial('/test/error should return json format error (Youch)', async t => {
// Close server and ask nuxt to stop listening to file changes // Close server and ask nuxt to stop listening to file changes
test.after.always('Closing server and nuxt.js', async t => { test.after.always('Closing server and nuxt.js', async t => {
delete process.env.NODE_ENV
await nuxt.close() await nuxt.close()
}) })