Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit be14839

Browse files
authored
fix: e2e tests are configured with project's nuxt.config (#670)
1 parent 34a6cc5 commit be14839

File tree

1 file changed

+4
-3
lines changed
  • packages/cna-template/template/frameworks/ava/test/e2e

1 file changed

+4
-3
lines changed

packages/cna-template/template/frameworks/ava/test/e2e/index.spec.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import { resolve } from 'path'
22
import test from 'ava'
33
import { Nuxt, Builder } from 'nuxt'
4+
import config from '../../nuxt.config'
45

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

910
// Init Nuxt.js and create a server listening on localhost:4000
1011
test.before(async () => {
11-
const config = {
12+
nuxt = new Nuxt({
13+
...config,
1214
dev: false,
1315
rootDir: resolve(__dirname, '../../')
14-
}
15-
nuxt = new Nuxt(config)
16+
})
1617
await new Builder(nuxt).build()
1718
await nuxt.server.listen(4000, 'localhost')
1819
}, 30000)

0 commit comments

Comments
 (0)