About Promise.finally is already going to stage 4, some promise library already support finally function.
Issue
Recently, I used finally with fetch in my code, everything is work well, but when I writing the test leverage by jest-fetch-mock, there's something wrong. Anyway, the modern browser's fetch already support finally except for Edge. you can try it easily on browser dev tool
Root cause
I think due to jest-fetch-mock still use native Promise so that some people will got above issue.
Hey @jefflau
Preface
About
Promise.finally
is already going to stage 4, some promise library already supportfinally
function.Issue
Recently, I used
finally
withfetch
in my code, everything is work well, but when I writing the test leverage byjest-fetch-mock
, there's something wrong. Anyway, the modern browser's fetch already support finally except for Edge. you can try it easily on browser dev toolRoot cause
I think due to
jest-fetch-mock
still use native Promise so that some people will got above issue.Do you consider to use
promise-polyfill
to fix this issue?, it's already supportfinally
Probably, I can try to fix this issue by a PR after your confirmation