mirror of
https://github.com/actions/setup-node.git
synced 2025-06-28 13:43:48 +00:00
Merge f01118b9a5
into abb238b131
This commit is contained in:
commit
b6a48a9949
6 changed files with 40 additions and 17 deletions
|
@ -132,13 +132,13 @@ describe('cache-restore', () => {
|
|||
}
|
||||
});
|
||||
|
||||
await restoreCache(packageManager, '');
|
||||
await restoreCache(packageManager, '', '0');
|
||||
expect(hashFilesSpy).toHaveBeenCalled();
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`Cache restored from key: node-cache-${platform}-${packageManager}-${fileHash}`
|
||||
`Cache restored from key: ${platform}-0-setup-node-${packageManager}-${fileHash}`
|
||||
);
|
||||
expect(infoSpy).not.toHaveBeenCalledWith(
|
||||
`${packageManager} cache is not found`
|
||||
`Cache not found for input keys: ${platform}-0-setup-node-${packageManager}-${fileHash}, ${platform}-0-setup-node-${packageManager}-`
|
||||
);
|
||||
expect(setOutputSpy).toHaveBeenCalledWith('cache-hit', true);
|
||||
}
|
||||
|
@ -163,10 +163,10 @@ describe('cache-restore', () => {
|
|||
});
|
||||
|
||||
restoreCacheSpy.mockImplementationOnce(() => undefined);
|
||||
await restoreCache(packageManager, '');
|
||||
await restoreCache(packageManager, '', '0');
|
||||
expect(hashFilesSpy).toHaveBeenCalled();
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`${packageManager} cache is not found`
|
||||
`Cache not found for input keys: ${platform}-0-setup-node-${packageManager}-${fileHash}, ${platform}-0-setup-node-${packageManager}-`
|
||||
);
|
||||
expect(setOutputSpy).toHaveBeenCalledWith('cache-hit', false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue