mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
Fixed test
This commit is contained in:
@@ -110,11 +110,11 @@ describe("MediaApi", () => {
|
|||||||
const api = new MediaApi({}, mockedBackend.request);
|
const api = new MediaApi({}, mockedBackend.request);
|
||||||
|
|
||||||
const name = "image.png";
|
const name = "image.png";
|
||||||
const { res } = await api.getFile(name);
|
const res = await api.getFile(name);
|
||||||
const stream = await api.getFileStream(name);
|
const stream = await api.getFileStream(name);
|
||||||
expect(isReadableStream(stream)).toBe(true);
|
expect(isReadableStream(stream)).toBe(true);
|
||||||
|
|
||||||
const blob = (await new Response(res).blob()) as File;
|
const blob = (await res.res.blob()) as File;
|
||||||
expect(isFile(blob)).toBe(true);
|
expect(isFile(blob)).toBe(true);
|
||||||
expect(blob.size).toBeGreaterThan(0);
|
expect(blob.size).toBeGreaterThan(0);
|
||||||
expect(blob.type).toBe("image/png");
|
expect(blob.type).toBe("image/png");
|
||||||
|
|||||||
Reference in New Issue
Block a user