fix another edge case

This commit is contained in:
Simon Engledew
2020-12-04 15:18:22 +00:00
parent 1dc40ba165
commit 18c6a7d6d1
6 changed files with 38 additions and 8 deletions

View File

@@ -285,6 +285,20 @@ test("validateWorkflow() for a range of malformed workflows", (t) => {
t.deepEqual(actionsutil.validateWorkflow(1 as any), [
actionsutil.WorkflowErrors.MissingHooks,
]);
t.deepEqual(
actionsutil.validateWorkflow({
on: {
push: {
branches: 1,
},
pull_request: {
branches: 1,
},
},
} as any),
[]
);
});
test("validateWorkflow() when on.pull_request for every branch but push specifies branches", (t) => {