-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed axios globals error and edited tests accordingly
- Loading branch information
Joshua Avery
committed
Jul 22, 2019
1 parent
12a749a
commit 126874b
Showing
4 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const mockAxios = jest.genMockFromModule('axios') | ||
|
||
/*var axiosInst = { | ||
request: jest.fn(), | ||
get: jest.fn(), | ||
delete: jest.fn(), | ||
head: jest.fn(), | ||
options: jest.fn(), | ||
post: jest.fn(), | ||
put: jest.fn(), | ||
patch: jest.fn(), | ||
getUri: jest.fn() | ||
} */ | ||
|
||
mockAxios.create = jest.fn(()=> mockAxios) | ||
|
||
export default mockAxios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters