summaryrefslogtreecommitdiffstats
path: root/tests/javascript/unit/components/Explore.spec.ts
blob: bd50fe59251b7a0f3da7aea9fd76db0936aa8132 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
	});
});