Add outputs.cache-key

This commit is contained in:
Josh Soref 2022-01-23 13:46:47 -05:00
parent dbb732b211
commit dde36b38ea
8 changed files with 58 additions and 12 deletions

View file

@ -102,7 +102,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);
@ -118,7 +119,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);