Update utils.test.js

This commit is contained in:
Aleksandr Statciuk 2022-03-29 16:00:02 +03:00
parent 83a0ac2ff4
commit 6ca212a290
1 changed files with 2 additions and 1 deletions

View File

@ -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' },