【发布时间】:2021-05-27 23:41:24
【问题描述】:
我在 Nuxt.js 中有一个项目,我正在尝试使用 Vue Test Util 对其进行测试,除了在我使用 BootstrapVue 自定义 html 元素的文件上之外,它可以有效地工作。
当我运行 npm test 时,每个 BootsrapVue html 元素都会显示此错误。
console.error
[Vue warn]: Unknown custom element: <b-container> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <Anonymous>
<Root>
我怎样才能防止这种情况发生?
【问题讨论】:
标签: vue.js jestjs nuxt.js bootstrap-vue vue-test-utils