mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 20:40:05 +00:00
chore(*): fix failing tests
This commit is contained in:
8
src/__mocks__/axios.ts
Normal file
8
src/__mocks__/axios.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { AxiosStatic } from 'axios'
|
||||
|
||||
const mockAxios = jest.genMockFromModule('axios') as AxiosStatic
|
||||
|
||||
// this is the key to fix the axios.create() undefined error!
|
||||
mockAxios.create = jest.fn(() => mockAxios)
|
||||
|
||||
export default mockAxios
|
||||
Reference in New Issue
Block a user