I've been working on a simple web app to enhance my testing skills in Vue using Vue Test Utils and Jest. However, I encountered an error related to Vue while trying to console log and check if AddDialog is present in my Home file. The error message I received is:
TypeError: Cannot read property '_modulesNamespaceMap' of undefined
Below is the code snippet I used for testing:
// Imports
import Home from '@/components/Home'
// Utilities
import {createLocalVue, mount} from '@vue/test-utils'
import Vue from 'vue'
import Vuetify from 'vuetify'
import AddDialog from "@/components/AddDialog";
Vue.use(Vuetify)
describe('Home.vue', () => {
const localVue = createLocalVue()
let vuetify
beforeEach(() => {
vuetify = new Vuetify()
})
test('creates a todo', async () => {
const wrapper = mount(Home)
console.log(wrapper)
})
})