0

我想将我的组件包装在组件测试中。我正在使用柏树和 vue3。例如:

import { mount } from "@cypress/vue";
import mycomp from "./mycomp.vue";
describe("Test", () => {
    const wrapper = {
        template: `<div><mycomp/></div>`,
        components: {
            mycomp,
        },
    };
    it("Mount comp", () => {
        mount(wrapper);
    });
});

我发现 [https://stackoverflow.com/questions/69046663/how-can-i-wrap-a-vue-component-during-cypress-component-testing][1] 这对我不起作用。我的错误在哪里或有其他方法可以做到这一点?

4

0 回答 0