fix: update unit tests for DecodedPreview return type and outpaint tier arg

This commit is contained in:
SnapOtter
2026-05-13 15:53:09 +08:00
parent c3dc98834d
commit e1ca06cd95
3 changed files with 10 additions and 4 deletions
@@ -118,6 +118,7 @@ describe("fetchDecodedPreview", () => {
fetchMock.mockResolvedValueOnce({
ok: true,
blob: () => Promise.resolve(blob),
headers: { get: () => null },
});
const file = new File(["heic-data"], "photo.heic", { type: "image/heic" });
@@ -132,7 +133,7 @@ describe("fetchDecodedPreview", () => {
const formData = opts.body as FormData;
expect(formData.get("file")).toBe(file);
expect(result).toBe("blob:preview-url");
expect(result?.url).toBe("blob:preview-url");
expect(createObjectURL).toHaveBeenCalledWith(blob);
});