Vitest integration with Quasar #947
Replies: 2 comments 1 reply
-
Do you have Vite plugin for Quasar installed? Looks like quasar components fail to resolve. Automatic component import is handled by Vite plugin. https://quasar.dev/start/vite-plugin |
Beta Was this translation helpful? Give feedback.
-
For anyone facing the same issue, I just made it work, I was missing the Quasar plugin injection when mounting the component. I'll let my code below:
Implementation of quasar plugin in test:
Now, when it prints the html from the wrapper, Quasar elements are being shown as simple HTML elements. 💯 |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have been trying to integrate Vitest with a project that implements Quasar but I have not succeed doing so. The main problem that I am facing when testing is that quasar components are not rendering in HTML elements, so when I try to set a text on an element vitest does not identify it as a HTML element and I get the next error:
I tried a console.log(wrapper.get('[label="Email"]').html()) and I got the follow:
As you can see the element is not being "transformed" to an HTML tag. Is it possible an integration of quasar with vitest? If it is, could you please let me know how it should be ?
TIA
Beta Was this translation helpful? Give feedback.
All reactions