You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Blob returned from the blob function of a mocked response is not a proper blob.
Here is a test that showcases the problem:
beforeEach(()=>{fetchMock.mockResponse("some-data");});test("jest-fetch-mock can return blob",async()=>{constres=awaitfetch("url");constblob=awaitres.blob();expect(blob).toBeInstanceOf(Blob);});
This is the same as issue #105.
The
Blob
returned from theblob
function of a mocked response is not a proper blob.Here is a test that showcases the problem:
which yields the error
This means in-code typechecks such as
blob instanceOf Blob
fails in tests.jest-fetch-mock version: v3.0.3
Node version: v16.4.1
The text was updated successfully, but these errors were encountered: