Toggle deleteMode with button in Header

This commit is contained in:
2020-12-07 15:27:54 +01:00
parent 5ef8c424fd
commit d826e758ff
10 changed files with 64 additions and 39 deletions

View File

@@ -1,18 +0,0 @@
import { mount, RouterLinkStub } from "@vue/test-utils";
// import axios from "axios";
import store from "@/store/index.js";
import Fruits from "@/views/Fruits.vue";
// jest.mock("axios", () => ({
// get: jest.fn(() => Promise.resolve({ data: {} }))
// }));
describe("Test Fruits page.", () => {
it("dispatches getFruits on mounted", async () => {
// axios.get.mockImplementationOnce(() => Promise.resolve({ data: { data: "value" } }));
mount(Fruits, { store, stubs: { RouterLink: RouterLinkStub } });
await store.dispatch("getFruits");
expect(store.state.fruits.length).toBe(7);
});
});