From 08e9d03030f1d7e6254716b99affa6d20c8bd3cd Mon Sep 17 00:00:00 2001 From: Nikhil Bhoski <47204011+nbhoski@users.noreply.github.com> Date: Fri, 24 May 2024 12:58:26 +0530 Subject: [PATCH] Added tests --- src/buildSummary.unit.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buildSummary.unit.test.ts b/src/buildSummary.unit.test.ts index a1f839a..67856cf 100644 --- a/src/buildSummary.unit.test.ts +++ b/src/buildSummary.unit.test.ts @@ -26,7 +26,7 @@ describe('readJsonFile', () => { { name: 'Test Task', description: 'A test task', failed: false, skipped: false, duration: '00:00:10' }, ], }); - mockReadFile.mockImplementation((path, options, callback) => { + mockReadFile.mockImplementation((path: string, options: { encoding: string; flag?: string } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void) => { callback(null, mockData); }); @@ -38,7 +38,7 @@ describe('readJsonFile', () => { }); it('throws an error if the file cannot be read', async () => { - mockReadFile.mockImplementation((path, options, callback) => { + mockReadFile.mockImplementation((path: string, options: { encoding: string; flag?: string } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void) => { callback(new Error('File not found'), null); });