blob: 846211913d5cd555cf99a6f3cf889dd5af63d046 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import axios from "@nextcloud/axios";
import { shallowMount } from "@vue/test-utils";
import { store, localVue } from "../setupStore";
import * as router from "@nextcloud/router";
import Explore from "Components/Explore.vue";
jest.mock("@nextcloud/axios");
describe("Explore.vue", () => {
"use strict";
it("should initialize without showing AddFeed Component", () => {
(axios as any).get.mockResolvedValue({ data: {} });
(router as any).generateUrl = jest.fn().mockReturnValue("");
jest.fn().mockReturnValue
const wrapper = shallowMount(Explore, { localVue, store });
expect(wrapper.vm.$data.showAddFeed).toBeFalsy;
});
});
|