feat: add support event type schedule

This commit is contained in:
bluelovers 2020-01-10 09:52:18 +08:00
parent 60e292adf7
commit b94f90d18f
4 changed files with 9 additions and 4 deletions

View file

@ -51,7 +51,9 @@ test("restore with invalid event outputs warning", async () => {
process.env[Events.Key] = invalidEvent;
await run();
expect(logWarningMock).toHaveBeenCalledWith(
`Event Validation Error: The event type ${invalidEvent} is not supported. Only push, pull_request events are supported at this time.`
`Event Validation Error: The event type ${invalidEvent} is not supported. Only ${actionUtils
.getSupportedEvents()
.join(", ")} events are supported at this time.`
);
expect(failedMock).toHaveBeenCalledTimes(0);
});

View file

@ -65,7 +65,9 @@ test("save with invalid event outputs warning", async () => {
process.env[Events.Key] = invalidEvent;
await run();
expect(logWarningMock).toHaveBeenCalledWith(
`Event Validation Error: The event type ${invalidEvent} is not supported. Only push, pull_request events are supported at this time.`
`Event Validation Error: The event type ${invalidEvent} is not supported. Only ${actionUtils
.getSupportedEvents()
.join(", ")} events are supported at this time.`
);
expect(failedMock).toHaveBeenCalledTimes(0);
});