From 3aec06c05e85cb811b9187d0f511f41deb8b2f03 Mon Sep 17 00:00:00 2001 From: panticmilos Date: Mon, 18 Jul 2022 13:26:51 +0200 Subject: [PATCH] Mock resolved value test --- __tests__/cache-restore.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/__tests__/cache-restore.test.ts b/__tests__/cache-restore.test.ts index cb37cc93..7fe60cca 100644 --- a/__tests__/cache-restore.test.ts +++ b/__tests__/cache-restore.test.ts @@ -121,7 +121,9 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py } }); - computeKeysSpy.mockResolvedValue('Ubuntu-20.4'); + computeKeysSpy.mockImplementation(() => + Promise.resolve('Ubuntu-20.4') + ); } await cacheDistributor.restoreCache();