Using pesky 0.8.2, I get the following error when trying to run a component test:
Cannot read properties of undefined (reading 'child')
at createWrapper (node_modules/@vue/test-utils/dist/vue-test-utils.js:11371:32)
at Module.mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14071:10)
at Object.handler (src/components/Misc/Text.test.js:8:21)
The Text.test.js:
import { mount } from "@vue/test-utils";
import Text from "./Text.vue";
describe("vue + peeky demo", () => {
test("mount component", async () => {
expect(Text).toBeTruthy();
const wrapper = mount(Text, {
props: {
align: "left"
}
});
expect(wrapper.attributes("data-align")).toBe("left");
});
});
Using pesky 0.8.2, I get the following error when trying to run a component test:
The
Text.test.js
: