mirror of
https://github.com/actions/cache.git
synced 2026-07-02 18:34:40 +00:00
Compare commits
1 Commits
1af441f56e
...
f07fa3db7e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f07fa3db7e |
@ -449,19 +449,3 @@ test("restore with lookup-only set", async () => {
|
|||||||
);
|
);
|
||||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("restore failure with earlyExit should call process exit", async () => {
|
|
||||||
testUtils.setInput(Inputs.Path, "node_modules");
|
|
||||||
const failedMock = jest.spyOn(core, "setFailed");
|
|
||||||
const restoreCacheMock = jest.spyOn(cache, "restoreCache");
|
|
||||||
const processExitMock = jest.spyOn(process, "exit").mockImplementation();
|
|
||||||
|
|
||||||
// call restoreImpl with `earlyExit` set to true
|
|
||||||
await restoreImpl(new StateProvider(), true);
|
|
||||||
|
|
||||||
expect(restoreCacheMock).toHaveBeenCalledTimes(0);
|
|
||||||
expect(failedMock).toHaveBeenCalledWith(
|
|
||||||
"Input required and not supplied: key"
|
|
||||||
);
|
|
||||||
expect(processExitMock).toHaveBeenCalledWith(1);
|
|
||||||
});
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user