Closed EthanML closed 4 years ago
Just looking at this now. I went and checked the PR and I checked the current package.json
Seems to be all there, so not sure why it wouldn't work
@EthanML Did it work for you in the end?
@jefflau It didn't, I just ended up with an implementation that didn't use finally
😅 Still not sure what the issue is/was.
@EthanML it can be related to NodeJS version. If you're using lover that 10, finally
keyword is not supported there and it will throw error
When attempting to test code that uses
.finally
on a Promise chain I get the following error:Code in question:
The test makes use of the following fetch mocking function:
I came across https://github.com/jefflau/jest-fetch-mock/pull/58 which appeared to be intended to fix exactly this issue, so I'm confused why this is happening for me. Does anyone know why I'd still be seeing this error given the fix in that PR?