mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
test: fix debug test
This commit is contained in:
parent
11c1dff5f3
commit
ed379b33a3
@ -10,8 +10,7 @@ const url = route => 'http://localhost:' + port + route
|
|||||||
let nuxt = null
|
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.before('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
|
||||||
@ -101,6 +100,5 @@ 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()
|
||||||
})
|
})
|
||||||
|
3
test/fixtures/debug/nuxt.config.js
vendored
3
test/fixtures/debug/nuxt.config.js
vendored
@ -6,5 +6,8 @@ module.exports = {
|
|||||||
debug: true,
|
debug: true,
|
||||||
build: {
|
build: {
|
||||||
stats: false
|
stats: false
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
'NODE_ENV': 'development'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user