mirror of
https://github.com/actions/cache.git
synced 2025-04-21 11:36:45 +00:00
Update warnings behavior
This commit is contained in:
parent
d9fe1b81f9
commit
c48b49d8ee
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