From 9c76d7346319646c95887fcacbcb06567ce4e048 Mon Sep 17 00:00:00 2001 From: panticmilos Date: Mon, 18 Jul 2022 12:54:17 +0200 Subject: [PATCH] Amend unit tests --- __tests__/cache-restore.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) 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') {