mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
refactor: ava test
This commit is contained in:
parent
98fd8637ff
commit
7a7239d35d
@ -9,16 +9,12 @@ let nuxt = null
|
|||||||
|
|
||||||
// Init Nuxt.js and create a server listening on localhost:4000
|
// Init Nuxt.js and create a server listening on localhost:4000
|
||||||
test.before(async () => {
|
test.before(async () => {
|
||||||
const rootDir = resolve(__dirname, '..')
|
const config = {
|
||||||
let config = {}
|
dev: false,
|
||||||
try {
|
rootDir: resolve(__dirname, '..')
|
||||||
config = require(resolve(rootDir, 'nuxt.config.js'))
|
|
||||||
} catch (e) {
|
|
||||||
}
|
}
|
||||||
config.rootDir = rootDir // project folder
|
|
||||||
config.dev = false // production build
|
|
||||||
nuxt = new Nuxt(config)
|
nuxt = new Nuxt(config)
|
||||||
new Builder(nuxt).build()
|
await new Builder(nuxt).build()
|
||||||
await nuxt.listen(4000, 'localhost')
|
await nuxt.listen(4000, 'localhost')
|
||||||
}, 30000)
|
}, 30000)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user