update mocks

This commit is contained in:
Rob Herley 2025-02-14 09:42:41 -05:00
parent e6fb8f1c5d
commit 7fe619c58c
No known key found for this signature in database
GPG Key ID: D1602042C3543B06

View File

@ -115,7 +115,6 @@ test('restore with restore keys and no cache found', async () => {
const paths = ['node_modules'] const paths = ['node_modules']
const key = 'node-test' const key = 'node-test'
const restoreKeys = ['node-'] const restoreKeys = ['node-']
const logWarningMock = jest.spyOn(core, 'warning')
jest jest
.spyOn(CacheServiceClientJSON.prototype, 'GetCacheEntryDownloadURL') .spyOn(CacheServiceClientJSON.prototype, 'GetCacheEntryDownloadURL')
@ -130,7 +129,7 @@ test('restore with restore keys and no cache found', async () => {
const cacheKey = await restoreCache(paths, key, restoreKeys) const cacheKey = await restoreCache(paths, key, restoreKeys)
expect(cacheKey).toBe(undefined) expect(cacheKey).toBe(undefined)
expect(logWarningMock).toHaveBeenCalledWith( expect(logDebugMock).toHaveBeenCalledWith(
`Cache not found for keys: ${[key, ...restoreKeys].join(', ')}` `Cache not found for keys: ${[key, ...restoreKeys].join(', ')}`
) )
}) })