From bdfd06e9517ca7cf665b827e3eb1813f4545c4d7 Mon Sep 17 00:00:00 2001 From: panticmilos Date: Mon, 18 Jul 2022 15:13:38 +0200 Subject: [PATCH] Mock always getLinuxOS --- __tests__/cache-restore.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/__tests__/cache-restore.test.ts b/__tests__/cache-restore.test.ts index 7fe60cca..3df60872 100644 --- a/__tests__/cache-restore.test.ts +++ b/__tests__/cache-restore.test.ts @@ -114,16 +114,14 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py dependencyFile ); + computeKeysSpy.mockImplementation(() => Promise.resolve('Ubuntu-20.4')); + if (process.env['RUNNER_OS'] === 'linux') { Object.defineProperty(utils, 'IS_LINUX', { value: () => { jest.fn().mockReturnValue(true); } }); - - computeKeysSpy.mockImplementation(() => - Promise.resolve('Ubuntu-20.4') - ); } await cacheDistributor.restoreCache();