Files
fruit-project/tests/unit/global.spec.js
2020-12-07 15:37:32 +01:00

25 lines
624 B
JavaScript

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();
});
});