Closed Mark-ICS closed 1 month ago
Hi @Mark-ICS
Thanks for the repro. It looks like the code throwing is from element-plus because they rely on internal stuff from transition. You probably need to enable transitions in your test to work around that (transitions are disabled by default in tests). Something similar to what I explain in https://github.com/vuejs/test-utils/discussions/1913
Let me know if that helps
Thanks for the response... As per the linked discussion, pass this to the mount
arguments solved the issue:
global: {
stubs: {
transition: false,
},
},
Would you consider this a design issue with Element Plus? I imagine it should work with or without transitions?
I haven't looked into the details of why they use this code but this feels a bit hacky (as the // @ts-ignore
hints to):
Anyway I'm happy if that solves your issue, I'll close 👍
Thank you!
Describe the bug I am getting the following error when I call
mount
on the following component:Here is a full example of the component:
Here is an example: https://stackblitz.com/edit/github-pd8bru?file=src%2Fcomponents%2FHelloWorld.vue
To Reproduce https://stackblitz.com/edit/github-pd8bru?file=src%2Fcomponents%2FHelloWorld.vue
Expected behavior
mount
to workRelated information:
Additional context