Uh oh!
There was an error while loading. Please reload this page.
refactor: remove axios - #1237
Conversation
7d3a5c5 to
7a1f63eCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| .expect(StatusCodes.INTERNAL_SERVER_ERROR); | ||
| }); | ||
| it('should catch IPFS timeout error', async () => { |
There was a problem hiding this comment.
I decided to remove this test. it's a bit hard to replicate and I feel it has no real value
There was a problem hiding this comment.
I disagree with this. The Request Node still writes to IPFS but it should fail gracefully if for some reason that write fails.
Uh oh!
There was an error while loading. Please reload this page.
| expect(config.headers[httpConfigDefaults.requestClientVersionHeader]).toBe( | ||
| packageJson.version, | ||
| ); |
There was a problem hiding this comment.
I ditched that test, I don't really see the intention
Uh oh!
There was an error while loading. Please reload this page.
c33e957 to
0def2baCompared30f9c0 to
d27db26Compare9dec3a3 to
a2642acCompare0def2ba to
b7df198Compareyomarion
commented
Jan 17, 2024
FYI @benjlevesque, the |
benjlevesque
commented
Jan 17, 2024
|
| mockServer.close(); | ||
| }); | ||
| it('specify the Request Client version in the header', async () => { |
There was a problem hiding this comment.
I couldn't find where we assert in this test that the client version is passed down in the headers. Is the test name wrong, or is this assertion missing?
There was a problem hiding this comment.
What was the conclusion here?
There was a problem hiding this comment.
I think it was a typo and it was renamed back to the original name. cc @benjlevesque can you confirm?
There was a problem hiding this comment.
yes, sorry my comment remained "pending":
good catch. Probably a bad merge or copy paste, I removed that test
but in the meantime I also added back a check on the version header
Uh oh!
There was an error while loading. Please reload this page.
d68636a to
8e03773Compare
Motivation
Changing to MSW for mocks also has the benefit to be compatible with any client.
Choices
gas-price-definer. This is never used, since feat!: drop legacy storage #1117IpfsStore.read. This is never used.maxSizefromIpfsManager.read. This method is kept as a convenience, as it's useful to test thereadafter upload, but is no longer used (since feat!: drop legacy storage #1117).axiosremains adevDependencyofsmart-contractsandtoolboxfor now