From e6514c5aab3ca9121d133490be27810ba909b668 Mon Sep 17 00:00:00 2001 From: Tatsat Mishra Date: Tue, 28 Oct 2025 17:37:29 +1300 Subject: [PATCH] Fix build error. Signed-off-by: Tatsat Mishra --- src/run.test.ts | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/src/run.test.ts b/src/run.test.ts index 6e10689..319dd0f 100644 --- a/src/run.test.ts +++ b/src/run.test.ts @@ -108,20 +108,20 @@ describe('run.ts', () => { jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => { if (file == 'mainFolder') return [ - 'file1' as unknown as fs.Dirent>, - 'file2' as unknown as fs.Dirent>, - 'folder1' as unknown as fs.Dirent>, - 'folder2' as unknown as fs.Dirent> + 'file1' as unknown as fs.Dirent, + 'file2' as unknown as fs.Dirent, + 'folder1' as unknown as fs.Dirent, + 'folder2' as unknown as fs.Dirent ] if (file == path.join('mainFolder', 'folder1')) return [ - 'file11' as unknown as fs.Dirent>, - 'file12' as unknown as fs.Dirent> + 'file11' as unknown as fs.Dirent, + 'file12' as unknown as fs.Dirent ] if (file == path.join('mainFolder', 'folder2')) return [ - 'file21' as unknown as fs.Dirent>, - 'file22' as unknown as fs.Dirent> + 'file21' as unknown as fs.Dirent, + 'file22' as unknown as fs.Dirent ] return [] }) @@ -143,20 +143,20 @@ describe('run.ts', () => { jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => { if (file == 'mainFolder') return [ - 'file1' as unknown as fs.Dirent>, - 'file2' as unknown as fs.Dirent>, - 'folder1' as unknown as fs.Dirent>, - 'folder2' as unknown as fs.Dirent> + 'file1' as unknown as fs.Dirent, + 'file2' as unknown as fs.Dirent, + 'folder1' as unknown as fs.Dirent, + 'folder2' as unknown as fs.Dirent ] if (file == path.join('mainFolder', 'folder1')) return [ - 'file11' as unknown as fs.Dirent>, - 'file12' as unknown as fs.Dirent> + 'file11' as unknown as fs.Dirent, + 'file12' as unknown as fs.Dirent ] if (file == path.join('mainFolder', 'folder2')) return [ - 'file21' as unknown as fs.Dirent>, - 'file22' as unknown as fs.Dirent> + 'file21' as unknown as fs.Dirent, + 'file22' as unknown as fs.Dirent ] return [] }) @@ -176,7 +176,7 @@ describe('run.ts', () => { jest.spyOn(fs, 'chmodSync').mockImplementation(() => {}) jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => { if (file == 'mainFolder') - return ['helm.exe' as unknown as fs.Dirent>] + return ['helm.exe' as unknown as fs.Dirent] return [] }) jest.spyOn(fs, 'statSync').mockImplementation((file) => { @@ -220,7 +220,7 @@ describe('run.ts', () => { jest .spyOn(fs, 'readdirSync') .mockImplementation((file, _) => [ - 'helm.exe' as unknown as fs.Dirent> + 'helm.exe' as unknown as fs.Dirent ]) jest.spyOn(fs, 'statSync').mockImplementation((file) => { const isDirectory = @@ -269,9 +269,7 @@ describe('run.ts', () => { jest.spyOn(fs, 'chmodSync').mockImplementation(() => {}) jest .spyOn(fs, 'readdirSync') - .mockReturnValue([ - 'helm.exe' as unknown as fs.Dirent> - ]) + .mockReturnValue(['helm.exe' as unknown as fs.Dirent]) jest.spyOn(fs, 'statSync').mockImplementation((file) => { const isDirectory = (file as string).indexOf('folder') == -1 ? false : true