Tag: Vue
How to Configure Jest for Vue apps Using Vuetify
October 9, 2019
I have recently been working on a Vue project which utilizes Vuetify for the base of some of it's components. Vue has the ability to register components globally, eliminating the need for importing base components. This works great in development, but I came across an error when testing the component with Vue Testing Library. Vue console error for using a globally registered component that could not be found This error occurred because Jest had not been configured to recognize Vuetify's global components. In order to resolve this, some additional information was required in the Jest setup file. First, we need to import both Vue and Vuetify in the setup file. By calling , Jest becomes aware of the plugin and the globally available components…