-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/add axios retry and better errors #863
Conversation
src/axios/index.ts
Outdated
axiosRetry(client); | ||
|
||
export const DEFAULT_RETRY_COUNT = 3; | ||
export default client; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we call it retryingClient
and export it non-defaultly?
package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
expect(fs.writeFile).toBeCalledWith( | ||
'/', | ||
new Uint8Array([84, 101, 115, 116]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does that mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We mock get
response with Test
string, and expect that writeFile will be called with uint representation of that string. fs.writeFile is mocked, so we can check args it was called with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, the array in question is basically Test
:
new Uint8Array([84, 101, 115, 116]).forEach((x) => console.log(String.fromCharCode(x)))
|
||
expect(fs.writeFile).toBeCalledWith( | ||
'/', | ||
new Uint8Array([84, 101, 115, 116]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, the array in question is basically Test
:
new Uint8Array([84, 101, 115, 116]).forEach((x) => console.log(String.fromCharCode(x)))
No description provided.