Remove validation failures and warning annotations (#108)

* Update warnings behavior

* Add void return type
This commit is contained in:
Josh Gross 2019-11-21 14:37:54 -05:00 committed by GitHub
parent 639f9d8b81
commit 95c1798369
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 82 additions and 40 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;