mirror of
https://github.com/actions/cache.git
synced 2025-04-22 03:56:45 +00:00
Linting tests
This commit is contained in:
parent
f2da2ec2dc
commit
39d6fa2203
1 changed files with 12 additions and 3 deletions
|
@ -248,7 +248,10 @@ test("restore with cache found", async () => {
|
||||||
expect(getCacheMock).toHaveBeenCalledWith([key]);
|
expect(getCacheMock).toHaveBeenCalledWith([key]);
|
||||||
expect(setCacheStateMock).toHaveBeenCalledWith(cacheEntry);
|
expect(setCacheStateMock).toHaveBeenCalledWith(cacheEntry);
|
||||||
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1);
|
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1);
|
||||||
expect(downloadCacheMock).toHaveBeenCalledWith(cacheEntry.archiveLocation, archivePath);
|
expect(downloadCacheMock).toHaveBeenCalledWith(
|
||||||
|
cacheEntry.archiveLocation,
|
||||||
|
archivePath
|
||||||
|
);
|
||||||
expect(getArchiveFileSizeMock).toHaveBeenCalledWith(archivePath);
|
expect(getArchiveFileSizeMock).toHaveBeenCalledWith(archivePath);
|
||||||
|
|
||||||
expect(extractTarMock).toHaveBeenCalledTimes(1);
|
expect(extractTarMock).toHaveBeenCalledTimes(1);
|
||||||
|
@ -312,7 +315,10 @@ test("restore with a pull request event and cache found", async () => {
|
||||||
expect(getCacheMock).toHaveBeenCalledWith([key]);
|
expect(getCacheMock).toHaveBeenCalledWith([key]);
|
||||||
expect(setCacheStateMock).toHaveBeenCalledWith(cacheEntry);
|
expect(setCacheStateMock).toHaveBeenCalledWith(cacheEntry);
|
||||||
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1);
|
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1);
|
||||||
expect(downloadCacheMock).toHaveBeenCalledWith(cacheEntry.archiveLocation, archivePath);
|
expect(downloadCacheMock).toHaveBeenCalledWith(
|
||||||
|
cacheEntry.archiveLocation,
|
||||||
|
archivePath
|
||||||
|
);
|
||||||
expect(getArchiveFileSizeMock).toHaveBeenCalledWith(archivePath);
|
expect(getArchiveFileSizeMock).toHaveBeenCalledWith(archivePath);
|
||||||
expect(infoMock).toHaveBeenCalledWith(`Cache Size: ~60 MB (62915000 B)`);
|
expect(infoMock).toHaveBeenCalledWith(`Cache Size: ~60 MB (62915000 B)`);
|
||||||
|
|
||||||
|
@ -377,7 +383,10 @@ test("restore with cache found for restore key", async () => {
|
||||||
expect(getCacheMock).toHaveBeenCalledWith([key, restoreKey]);
|
expect(getCacheMock).toHaveBeenCalledWith([key, restoreKey]);
|
||||||
expect(setCacheStateMock).toHaveBeenCalledWith(cacheEntry);
|
expect(setCacheStateMock).toHaveBeenCalledWith(cacheEntry);
|
||||||
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1);
|
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1);
|
||||||
expect(downloadCacheMock).toHaveBeenCalledWith(cacheEntry.archiveLocation, archivePath);
|
expect(downloadCacheMock).toHaveBeenCalledWith(
|
||||||
|
cacheEntry.archiveLocation,
|
||||||
|
archivePath
|
||||||
|
);
|
||||||
expect(getArchiveFileSizeMock).toHaveBeenCalledWith(archivePath);
|
expect(getArchiveFileSizeMock).toHaveBeenCalledWith(archivePath);
|
||||||
expect(infoMock).toHaveBeenCalledWith(`Cache Size: ~0 MB (142 B)`);
|
expect(infoMock).toHaveBeenCalledWith(`Cache Size: ~0 MB (142 B)`);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue