Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: e2e tests are configured with project's nuxt.config #670

Merged
merged 3 commits into from
Dec 23, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import { resolve } from 'path'
import test from 'ava'
import { Nuxt, Builder } from 'nuxt'
import config from '../../nuxt.config'

// We keep the nuxt and server instance
// So we can close them at the end of the test
let nuxt = null

// Init Nuxt.js and create a server listening on localhost:4000
test.before(async () => {
const config = {
nuxt = new Nuxt({
...config,
dev: false,
rootDir: resolve(__dirname, '../../')
}
nuxt = new Nuxt(config)
rootDir: resolve(__dirname, '../../'),
})
await new Builder(nuxt).build()
await nuxt.server.listen(4000, 'localhost')
}, 30000)
Expand Down