diff options
| author | Osmium Sorcerer <os@sof.beauty> | 2026-04-06 14:48:43 +0000 |
|---|---|---|
| committer | Osmium Sorcerer <os@sof.beauty> | 2026-04-18 16:52:23 +0000 |
| commit | 085204dbdf17f379c9a32ea11660accb51b4311d (patch) | |
| tree | dd85139d396f894e69cb66f94859b6d21731f311 /webAO/__tests__/downloadFile.test.ts | |
| parent | 45b706909323ba82035c49eb9d2b2546eeab6a78 (diff) | |
Update dependencies and ECMAScript target
Fix relevant breaking changes.
Diffstat (limited to 'webAO/__tests__/downloadFile.test.ts')
| -rw-r--r-- | webAO/__tests__/downloadFile.test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webAO/__tests__/downloadFile.test.ts b/webAO/__tests__/downloadFile.test.ts index 738d6f3..67c2c46 100644 --- a/webAO/__tests__/downloadFile.test.ts +++ b/webAO/__tests__/downloadFile.test.ts @@ -2,7 +2,7 @@ import downloadFile from "../services/downloadFile"; jest.useFakeTimers().setSystemTime(new Date("2020-01-01").getTime()); global.URL.createObjectURL = jest.fn(); -(window as any).global.Blob = function (content, options) { +(window as any).global.Blob = function (content: any, options: any) { return { content, options }; }; @@ -10,7 +10,7 @@ describe("downloadFile", () => { it("Creates an <a> tag", () => { const createElementSpy = jest.spyOn(document, "createElement"); downloadFile("hi", "filename"); - expect(createElementSpy).toBeCalled(); + expect(createElementSpy).toHaveBeenCalled(); }); it("Creates the blob with the correct data", () => { const data = "writingtestsishard"; @@ -22,6 +22,6 @@ describe("downloadFile", () => { type: "text", }, }; - expect(global.URL.createObjectURL).toBeCalledWith(expected); + expect(global.URL.createObjectURL).toHaveBeenCalledWith(expected); }); }); |
