Skip to content

Commit

Permalink
chore(deps): upgrade axios to 1.6.5 (#474)
Browse files Browse the repository at this point in the history
Closes #473
  • Loading branch information
harelmo-lumigo authored Jan 16, 2024
1 parent 76ba1f6 commit b2d8cae
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 20 deletions.
62 changes: 55 additions & 7 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 @@ -26,7 +26,7 @@
"dependencies": {
"@lumigo/node-core": "1.13.0",
"agentkeepalive": "^4.1.4",
"axios": "0.24.0",
"axios": "1.6.5",
"shimmer": "1.2.1",
"utf8": "^3.0.0"
},
Expand Down
26 changes: 14 additions & 12 deletions src/httpSpansAgent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ describe('HttpSpansAgent', () => {
const requests = AxiosMocker.getAxiosMocker().history.post;
expect(requests.length).toEqual(1);
expect(JSON.parse(requests[0].data)).toEqual(reqBody);
expect(requests[0].headers).toEqual({
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
Authorization: 't_xxx',
'User-Agent': '@lumigo/tracerMock$1.2.3',
});

expect(requests[0].headers['Accept']).toEqual('application/json, text/plain, */*');
expect(requests[0].headers['Content-Type']).toEqual('application/json');
expect(requests[0].headers['Authorization']).toEqual('t_xxx');
expect(requests[0].headers['Accept']).toEqual('application/json, text/plain, */*');
expect(requests[0].headers['User-Agent']).toEqual('@lumigo/tracerMock$1.2.3');

expect(requests[0].timeout).toEqual(300);
expect(requests[0].url).toEqual(url);
expect(requests[0].httpsAgent).toBeUndefined();
Expand All @@ -39,12 +40,13 @@ describe('HttpSpansAgent', () => {
const requests = AxiosMocker.getAxiosMocker().history.post;
expect(requests.length).toEqual(1);
expect(JSON.parse(requests[0].data)).toEqual(reqBody);
expect(requests[0].headers).toEqual({
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
Authorization: 't_xxx',
'User-Agent': '@lumigo/tracerMock$1.2.3',
});

expect(requests[0].headers['Accept']).toEqual('application/json, text/plain, */*');
expect(requests[0].headers['Content-Type']).toEqual('application/json');
expect(requests[0].headers['Authorization']).toEqual('t_xxx');
expect(requests[0].headers['Accept']).toEqual('application/json, text/plain, */*');
expect(requests[0].headers['User-Agent']).toEqual('@lumigo/tracerMock$1.2.3');

expect(requests[0].timeout).toEqual(300);
expect(requests[0].url).toEqual(url);
});
Expand Down

0 comments on commit b2d8cae

Please sign in to comment.