From b2cea7b142de83cb55aa78ca3a712ad94e5e9140 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Tue, 7 Jan 2025 22:46:43 +0900 Subject: [PATCH] Update failed test --- test/converter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/converter.ts b/test/converter.ts index e2cd3301..bb9067e0 100644 --- a/test/converter.ts +++ b/test/converter.ts @@ -589,7 +589,7 @@ describe('Converter', () => { async () => { const file = new File(onePath) - const fileCleanup = jest.spyOn(File.prototype as any, 'cleanup') + const unlink = jest.spyOn(fs.promises, 'unlink') const fileSave = jest .spyOn(File.prototype, 'save') .mockImplementation() @@ -609,7 +609,7 @@ describe('Converter', () => { expect(fileTmp).toHaveBeenCalledWith( expect.objectContaining({ extension: '.html' }) ) - expect(fileCleanup).toHaveBeenCalledWith( + expect(unlink).toHaveBeenCalledWith( expect.stringContaining(os.tmpdir()) ) expect(fileSave).toHaveBeenCalled()