import { mount, createLocalVue } from "@vue/test-utils"; import Vuex from "vuex"; import App from "@/App.vue"; const localVue = createLocalVue(); localVue.use(Vuex); describe("App", () => { let store; beforeEach(() => { store = new Vuex.Store(); }); it("should be a Vue instance", () => { const wrapper = mount(App, { store, localVue, stubs: ["router-link", "router-view"] }); expect(wrapper.vm).toBeTruthy(); }); it("renders correctly", () => { const wrapper = mount(App, { store, localVue, stubs: ["router-link", "router-view"] }); expect(wrapper.find("#app")).toBeTruthy(); }); });