Skip to content

Commit

Permalink
fix: revert "fix(deps): update dependency axios to v1 (#692)" (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah authored Oct 29, 2022
1 parent 78e78cf commit 53773a9
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 59 deletions.
94 changes: 42 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
"dependencies": {
"aws-sdk": "^2.678.0",
"axios": "^1.0.0",
"axios": "^0.27.0",
"filter-obj": "^3.0.0",
"jest-diff": "^28.0.0",
"uuid": "^9.0.0"
Expand Down
8 changes: 2 additions & 6 deletions src/utils/api.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import { getResponse } from './api';

jest.mock('axios', () => {
return {
default: jest.fn(),
};
});
jest.mock('axios');

describe('api utils', () => {
test('should call axios with relevant parameters', async () => {
const { default: axios } = require('axios');
const axios = require('axios');

const expected = { status: 500, data: { message: 'Hello World!' } };
axios.mockReturnValue(Promise.resolve(expected));
Expand Down

0 comments on commit 53773a9

Please sign in to comment.