Skip to content

Instantly share code, notes, and snippets.

@sandalsoft
Created January 11, 2019 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandalsoft/337b82827e5758c2bae28246e51d905a to your computer and use it in GitHub Desktop.
Save sandalsoft/337b82827e5758c2bae28246e51d905a to your computer and use it in GitHub Desktop.
// from https://stackoverflow.com/questions/51393952/mock-inner-axios-create/51414152#51414152
const mockAxios: any = jest.genMockFromModule('axios');
mockAxios.get = jest.fn(() => mockAxios);
mockAxios.post = jest.fn(() => mockAxios);
export default mockAxios;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment