diff options
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); }); }); |
