diff options
| author | Osmium Sorcerer <os@sof.beauty> | 2026-04-06 14:48:43 +0000 |
|---|---|---|
| committer | Osmium Sorcerer <os@sof.beauty> | 2026-06-06 03:09:27 +0000 |
| commit | 31275da317fd58739974ac49c995bca2f7dbcc08 (patch) | |
| tree | 7b14578ec28cc3106183d5e7e7197d75399d37d1 /webAO/__tests__/downloadFile.test.ts | |
| parent | f9b5d128fbd63760d4aba9965f4f2eeaf3adb33b (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 738d6f36..67c2c46a 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); }); }); |
