3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-25 12:55:32 +00:00

Release v1.0.3

This commit is contained in:
Josh Gross 2019-11-21 14:57:29 -05:00
parent 44543250bd
commit cffae9552b
12 changed files with 114 additions and 52 deletions

View file

@ -162,6 +162,16 @@ test("getCacheState with valid state", () => {
expect(getStateMock).toHaveBeenCalledTimes(1);
});
test("logWarning logs a message with a warning prefix", () => {
const message = "A warning occurred.";
const infoMock = jest.spyOn(core, "info");
actionUtils.logWarning(message);
expect(infoMock).toHaveBeenCalledWith(`[warning]${message}`);
});
test("isValidEvent returns false for unknown event", () => {
const event = "foo";
process.env[Events.Key] = event;