如何运行nuxt ava e2e测试

时间:2019-09-02 16:39:02

标签: nuxt.js e2e-testing ava

我正在尝试遵循示例here,但在我的项目中遇到以下错误:

$ ava --serial --verbose

Error occurred when calling nuxtServerInit:  Cannot read property 'user' of undefined
  ✖ Route / exits and render HTML Rejected promise returned by test
Error occurred when calling nuxtServerInit:  Cannot read property 'user' of undefined
  ✖ Route / exits and render HTML with CSS applied Rejected promise returned by test

  2 tests failed

  Route / exits and render HTML

  .../../server.js:1

  Rejected promise returned by test. Reason:

  TypeError {
    message: 'Cannot read property \'user\' of undefined',
  }

  Store.nuxtServerInit (server.js:1:0)
  Array.wrappedActionHandler (node_modules/vuex/dist/vuex.common.js:734:23)
  Store.dispatch (node_modules/vuex/dist/vuex.common.js:439:15)
  Store.boundDispatch [as dispatch] (node_modules/vuex/dist/vuex.common.js:333:21)
  t.default (server.js:1:0)

您知道我在做什么错吗?

0 个答案:

没有答案