diff options
Diffstat (limited to 'tests/javascript/unit/components/Explore.spec.ts')
-rw-r--r-- | tests/javascript/unit/components/Explore.spec.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/javascript/unit/components/Explore.spec.ts b/tests/javascript/unit/components/Explore.spec.ts index b0fe86a28..bd50fe592 100644 --- a/tests/javascript/unit/components/Explore.spec.ts +++ b/tests/javascript/unit/components/Explore.spec.ts @@ -1,18 +1,21 @@ - +import axios from '@nextcloud/axios' import { shallowMount } from '@vue/test-utils' import { store, localVue } from '../setupStore' -import axios from '@nextcloud/axios' 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.get = jest.fn().mockResolvedValue({ data: { } }) - (router as any).generateUrl = jest.fn().mockReturnedValue(''); + (axios as any).get.mockResolvedValue({ data: { } }) + (router as any).generateUrl = jest.fn().mockReturnValue(''); const wrapper = shallowMount(Explore, { localVue, store }) |