First iteration on feedback

This commit is contained in:
Simon Engledew 2020-12-01 20:08:41 +00:00
parent 56b1ead679
commit 4d862616ce
No known key found for this signature in database
GPG key ID: 84302E7B02FE8BCE
7 changed files with 50 additions and 41 deletions

View file

@ -213,19 +213,21 @@ ava_1.default("formatWorkflowCause()", (t) => {
t.deepEqual(message, "CheckoutWrongHead,PathsSpecified");
t.deepEqual(actionsutil.formatWorkflowCause([]), undefined);
});
ava_1.default("patternsOverlap()", (t) => {
t.false(actionsutil.patternsOverlap("main-*", "main"));
t.true(actionsutil.patternsOverlap("*", "*"));
t.true(actionsutil.patternsOverlap("*", "main-*"));
t.false(actionsutil.patternsOverlap("main-*", "*"));
t.false(actionsutil.patternsOverlap("main-*", "main"));
t.true(actionsutil.patternsOverlap("main", "main"));
t.false(actionsutil.patternsOverlap("*", "feature/*"));
t.true(actionsutil.patternsOverlap("**", "feature/*"));
t.false(actionsutil.patternsOverlap("feature-*", "**"));
t.false(actionsutil.patternsOverlap("a/**/c", "a/**/d"));
t.false(actionsutil.patternsOverlap("a/**/c", "a/**"));
t.true(actionsutil.patternsOverlap("/robin/*/release/*", "/robin/moose/release/goose"));
t.false(actionsutil.patternsOverlap("/robin/moose/release/goose", "/robin/*/release/*"));
ava_1.default("patternIsSuperset()", (t) => {
t.false(actionsutil.patternIsSuperset("main-*", "main"));
t.true(actionsutil.patternIsSuperset("*", "*"));
t.true(actionsutil.patternIsSuperset("*", "main-*"));
t.false(actionsutil.patternIsSuperset("main-*", "*"));
t.false(actionsutil.patternIsSuperset("main-*", "main"));
t.true(actionsutil.patternIsSuperset("main", "main"));
t.false(actionsutil.patternIsSuperset("*", "feature/*"));
t.true(actionsutil.patternIsSuperset("**", "feature/*"));
t.false(actionsutil.patternIsSuperset("feature-*", "**"));
t.false(actionsutil.patternIsSuperset("a/**/c", "a/**/d"));
t.false(actionsutil.patternIsSuperset("a/**/c", "a/**"));
t.true(actionsutil.patternIsSuperset("a/**/c", "a/main-**/c"));
t.false(actionsutil.patternIsSuperset("a/main-**/c", "a/**/c"));
t.true(actionsutil.patternIsSuperset("/robin/*/release/*", "/robin/moose/release/goose"));
t.false(actionsutil.patternIsSuperset("/robin/moose/release/goose", "/robin/*/release/*"));
});
//# sourceMappingURL=actions-util.test.js.map