Update utils.test.js
This commit is contained in:
parent
83a0ac2ff4
commit
6ca212a290
|
@ -1,5 +1,6 @@
|
|||
import mockAxios from 'jest-mock-axios'
|
||||
import utils from '../src/utils'
|
||||
import axios from 'axios'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
|
@ -148,7 +149,7 @@ it('can fetch data', () => {
|
|||
url: 'http://example.com/20210319/1tv.json',
|
||||
withCredentials: true
|
||||
}
|
||||
utils.fetchData(request).then(jest.fn).catch(jest.fn)
|
||||
utils.fetchData(axios, request).then(jest.fn).catch(jest.fn)
|
||||
expect(mockAxios).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
data: { accountID: '123' },
|
||||
|
|
Loading…
Reference in New Issue