Home

Issue: 961

Problems with testing

[issue link]

Hello, when I tried to insert the code from the sample (https://nuxtjs.org/guide/development-tools#end-to-end-testing) for testing and run it, I came across this error:
1 failed

Init Nuxt.js
tests/pages/index.spec.js:18

17: nuxt = new Nuxt(config)
18: await nuxt.build()
19: server = new nuxt.Server(nuxt)

Rejected promise returned by test

Rejection reason:

[TypeError: nuxt.build is not a function]

Test. (tests/pages/index.spec.js:18:14)
step (tests/pages/index.spec.js:18:191)
Test. (tests/pages/index.spec.js:18:99)
Test._ava2.default.before [as fn] (tests/pages/index.spec.js:11:1)

How can I fix it?

This question is available on Nuxt.js community (#c828)