From 10fbfab203c03652d4b349aacd157b182040f1d7 Mon Sep 17 00:00:00 2001 From: Edwin Sirko Date: Fri, 26 Jan 2024 21:54:16 -0500 Subject: [PATCH] fix --- __tests__/main.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 5c16296..c7d940d 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -154,7 +154,10 @@ describe('action', () => { return '' }) - isDirectoryMock.mockImplementation(() => true) + // isDirectoryMock.mockImplementation(() => true) + getConsolidatedDirectoryMock.mockImplementation(() => { + return { consolidatedDirectory: '/tmp/test', needToCleanUpDir: false } + }) isActionRepoMock.mockImplementation(() => true) createTempDirMock.mockImplementation(() => '/tmp/test') @@ -167,7 +170,7 @@ describe('action', () => { await main.run('directory') // Check the results - expect(isDirectoryMock).toHaveBeenCalledWith('directory') + expect(getConsolidatedDirectoryMock).toHaveBeenCalledTimes(1) expect(setFailedMock).toHaveBeenCalledWith('Something went wrong') // Expect the files to be cleaned up