使用vue/test-utils, 运行时报错requires Vue > 2.5.18. 我的vue 版本是2.5.2

使用vue/test-utils, 当我运行npm test,报错sync mode requires Vue > 2.5.18. 我的vue 版本是2.5.2 。

具体报错如下:

console.error node_modules/@vue/test-utils/dist/vue-test-utils.js:1421

[vue-test-utils]: Vue Test Utils runs in sync mode by default. Due to bugs, sync mode requires Vue > 2.5.18. In Vue Test Utils 1.0 sync mode will only be supported with Vue 2.5.18+ running in development mode. If you are unable to upgrade, you should rewrite your tests to run asynchronouslyyou can do this by setting the sync mounting option to false.

谁能给我一下建议
阅读 2.5k
1 个回答

这个没办法,你必须更新一下版本。 package.json修改版本,然后npm install

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题