mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-29 06:18:04 +08:00
Fix test
This commit is contained in:
12
packages/cache/__tests__/restoreCache.test.ts
vendored
12
packages/cache/__tests__/restoreCache.test.ts
vendored
@@ -142,7 +142,8 @@ test('restore with gzip compressed cache found', async () => {
|
||||
|
||||
expect(cacheKey).toBe(key)
|
||||
expect(getCacheMock).toHaveBeenCalledWith([key], paths, {
|
||||
compressionMethod: compression
|
||||
compressionMethod: compression,
|
||||
crossOsEnabled: false
|
||||
})
|
||||
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1)
|
||||
expect(downloadCacheMock).toHaveBeenCalledWith(
|
||||
@@ -210,7 +211,8 @@ test('restore with zstd as default but gzip compressed cache found on windows',
|
||||
|
||||
expect(cacheKey).toBe(key)
|
||||
expect(getCacheMock).toHaveBeenNthCalledWith(1, [key], paths, {
|
||||
compressionMethod: compression
|
||||
compressionMethod: compression,
|
||||
crossOsEnabled: false
|
||||
})
|
||||
expect(getCacheMock).toHaveBeenNthCalledWith(2, [key], paths, {
|
||||
compressionMethod: CompressionMethod.Gzip
|
||||
@@ -276,7 +278,8 @@ test('restore with zstd compressed cache found', async () => {
|
||||
|
||||
expect(cacheKey).toBe(key)
|
||||
expect(getCacheMock).toHaveBeenCalledWith([key], paths, {
|
||||
compressionMethod: compression
|
||||
compressionMethod: compression,
|
||||
crossOsEnabled: false
|
||||
})
|
||||
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1)
|
||||
expect(downloadCacheMock).toHaveBeenCalledWith(
|
||||
@@ -333,7 +336,8 @@ test('restore with cache found for restore key', async () => {
|
||||
|
||||
expect(cacheKey).toBe(restoreKey)
|
||||
expect(getCacheMock).toHaveBeenCalledWith([key, restoreKey], paths, {
|
||||
compressionMethod: compression
|
||||
compressionMethod: compression,
|
||||
crossOsEnabled: false
|
||||
})
|
||||
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1)
|
||||
expect(downloadCacheMock).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user