Pass tests
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
import { mount } from "@vue/test-utils";
|
||||
import { mount, createLocalVue } from "@vue/test-utils";
|
||||
import Vuex from "vuex";
|
||||
import App from "@/App.vue";
|
||||
|
||||
const localVue = createLocalVue();
|
||||
localVue.use(Vuex);
|
||||
|
||||
describe("App", () => {
|
||||
const wrapper = mount(App, { stubs: ["router-view", "router-link"] });
|
||||
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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user