Changed the loginApi to the expected apollo mock.

This commit is contained in:
Hannes Heine 2021-08-10 13:42:03 +02:00
parent f3e815eb91
commit 61a1647f63

View File

@ -1,12 +1,8 @@
import { mount, RouterLinkStub } from '@vue/test-utils'
import flushPromises from 'flush-promises'
import loginAPI from '../../apis/loginAPI.js'
import ForgotPassword from './ForgotPassword'
jest.mock('../../apis/loginAPI.js')
const mockAPIcall = jest.fn()
loginAPI.sendEmail = mockAPIcall
const localVue = global.localVue
@ -20,6 +16,9 @@ describe('ForgotPassword', () => {
$router: {
push: mockRouterPush,
},
$apollo: {
query: mockAPIcall,
},
}
const stubs = {