add mock for tests

This commit is contained in:
Dmitry Shibanov 2023-04-04 14:43:20 +02:00
parent 978873d606
commit 30fcc527a5

View File

@ -163,6 +163,12 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
fileHash,
cachePaths
) => {
restoreCacheSpy.mockImplementation(
(cachePaths: string[], primaryKey: string, restoreKey?: string) => {
return primaryKey.includes(fileHash) ? primaryKey : '';
}
);
const cacheDistributor = getCacheDistributor(
packageManager,
pythonVersion,