blob: fe547792e8cf481d7ece38f32f400c6027536812 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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('');
const wrapper = shallowMount(Explore, { localVue, store });
expect(wrapper.vm.$data.showAddFeed).toBeFalsy;
});
});
|