【发布时间】:2018-08-01 16:42:46
【问题描述】:
我正在尝试在使用 Vue-cli 应用程序创建的 Vue 应用程序中运行 jest-snapshot 测试。当我测试其中包含路由器链接的组件时,我收到以下警告。
[Vue warn]: Unknown custom element: <router-link> - did you register
the component correctly? For recursive components, make sure to
provide the "name" option.
按照此处Unit tests with View Router 的文档,我可以删除路由器链接,但这并没有通过我的快照测试。有没有人遇到过这个问题?
【问题讨论】:
标签: vuejs2 vue-router jestjs vue-test-utils