【发布时间】:2019-08-31 06:13:22
【问题描述】:
当我尝试测试 2 个组件(使用 2 个不同的测试文件)时,只有第一个文件会通过。
第二个将失败,[Vue warn]: Error in directive validate bind hook: "TypeError: Cannot read property '$scopedSlots' of undefined"。
我真的无法让它发挥作用。有没有人看到/解决过这个问题?
已在VeeValidate 和vue-test-utils 提出问题。
您可以在此处重现此行为:https://github.com/jourdanrodrigues/v-validate-issue
只需克隆、安装和npm run test:unit。你会看到错误。
【问题讨论】:
-
为了将来参考,我决定从我的项目中删除 VeeValidate 并使用纯 HTML5。
标签: vue.js vue-test-utils vee-validate