mirror of
https://github.com/actions/cache.git
synced 2025-04-19 02:26:45 +00:00
Remove validation failures and warning annotations (#108)
* Update warnings behavior * Add void return type
This commit is contained in:
parent
639f9d8b81
commit
95c1798369
8 changed files with 82 additions and 40 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue