Fixed test cases

This commit is contained in:
Sankalp Kotewar 2022-12-08 17:30:24 +00:00 committed by GitHub
parent 6f77edac15
commit 782b0bd3df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 84 deletions

View file

@ -15,10 +15,6 @@ beforeAll(() => {
return jest.requireActual("@actions/core").getInput(name, options);
});
jest.spyOn(actionUtils, "getCacheState").mockImplementation(() => {
return jest.requireActual("../src/utils/actionUtils").getCacheState();
});
jest.spyOn(actionUtils, "getInputAsArray").mockImplementation(
(name, options) => {
return jest
@ -86,11 +82,11 @@ test("save with no primary key in state outputs warning", async () => {
jest.spyOn(core, "getState")
// Cache Entry State
.mockImplementationOnce(() => {
return savedCacheKey;
return "";
})
// Cache Key State
.mockImplementationOnce(() => {
return "";
return savedCacheKey;
});
const saveCacheMock = jest.spyOn(cache, "saveCache");