mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-04-23 01:03:57 +08:00
Merge dde36b38ea
into b44d6c5cbf
This commit is contained in:
commit
e9b65c3cba
8 changed files with 59 additions and 13 deletions
|
@ -104,7 +104,8 @@ test("setOutputAndState with exact match to set cache-hit output and state", ()
|
|||
actionUtils.setOutputAndState(key, cacheKey);
|
||||
|
||||
expect(setOutputMock).toHaveBeenCalledWith(Outputs.CacheHit, "true");
|
||||
expect(setOutputMock).toHaveBeenCalledTimes(1);
|
||||
expect(setOutputMock).toHaveBeenCalledWith(Outputs.CacheKey, key);
|
||||
expect(setOutputMock).toHaveBeenCalledTimes(2);
|
||||
|
||||
expect(saveStateMock).toHaveBeenCalledWith(State.CacheMatchedKey, cacheKey);
|
||||
expect(saveStateMock).toHaveBeenCalledTimes(1);
|
||||
|
@ -120,7 +121,8 @@ test("setOutputAndState with no exact match to set cache-hit output and state",
|
|||
actionUtils.setOutputAndState(key, cacheKey);
|
||||
|
||||
expect(setOutputMock).toHaveBeenCalledWith(Outputs.CacheHit, "false");
|
||||
expect(setOutputMock).toHaveBeenCalledTimes(1);
|
||||
expect(setOutputMock).toHaveBeenCalledWith(Outputs.CacheKey, key);
|
||||
expect(setOutputMock).toHaveBeenCalledTimes(2);
|
||||
|
||||
expect(saveStateMock).toHaveBeenCalledWith(State.CacheMatchedKey, cacheKey);
|
||||
expect(saveStateMock).toHaveBeenCalledTimes(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue