diff --git a/__tests__/cache-restore.test.ts b/__tests__/cache-restore.test.ts index f27be5fe..d1c26967 100644 --- a/__tests__/cache-restore.test.ts +++ b/__tests__/cache-restore.test.ts @@ -115,8 +115,15 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py ); if (process.env['RUNNER_OS'] === 'linux') { + Object.defineProperty(utils, 'IS_LINUX', { + value: () => { + jest.fn().mockReturnValue(true); + } + }); + computeKeysSpy.mockImplementation(() => 'Ubuntu-20.4'); } + await cacheDistributor.restoreCache(); if (process.env['RUNNER_OS'] === 'linux') {