Skip to content

Commit

Permalink
fix mockfetcher by reordering imports
Browse files Browse the repository at this point in the history
  • Loading branch information
martenson committed Apr 27, 2023
1 parent 0f4ae67 commit 58a2cfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Page/PageDropdown.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { mockFetcher } from "tests/jest/mockFetcher";
import PageDropdown from "./PageDropdown.vue";
import { shallowMount } from "@vue/test-utils";
import { getLocalVue } from "tests/jest/helpers";
import flushPromises from "flush-promises";
import { mockFetcher } from "tests/jest/mockFetcher";

import "jest-location-mock";

Expand Down Expand Up @@ -108,7 +108,7 @@ describe("PageDropdown.vue", () => {
await mountAndDelete();
const emitted = wrapper.emitted();
expect(emitted["onRemove"][0][0]).toEqual("page1235");
// expect(emitted["onSuccess"][0][0]).toEqual("deleted...");
expect(emitted.onSuccess.exists);
});

it("should not fire deletion API request if not confirmed", async () => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Page/PageDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {
deletePage(id)
.then((response) => {
this.$emit("onRemove", id);
// this.$emit("onSuccess");
this.$emit("onSuccess");
})
.catch((error) => {
this.$emit("onError", error);
Expand Down

0 comments on commit 58a2cfb

Please sign in to comment.