diff --git a/client/src/components/Tags/model.test.js b/client/src/components/Tags/model.test.js index ce421e7c0c50..c70736920aeb 100644 --- a/client/src/components/Tags/model.test.js +++ b/client/src/components/Tags/model.test.js @@ -64,13 +64,35 @@ describe("Tags/model.js", () => { describe("Tag matching regular expression tests", () => { it("Should allow valid tags", () => { - const validTags = ["tag1", "tag.subtag", "tag.subtag.subtag", "tag.subtag:value", "🌌", "name:🌌", "🌌.🌌"]; + const validTags = [ + "tag1", + "tag.subtag", + "tag.subtag.subtag", + "tag.subtag:value", + "🌌", + "name:🌌", + "🌌.🌌", + "name:value..separated", + ]; for (const tag of validTags) { expect(VALID_TAG_RE.test(tag)).toBeTruthy(); } }); it("Should not allow invalid tags", () => { - const invalidTags = ["", " ", ".", "..", "...", ":", ":value", "tag:", "tag.", ".tag"]; + const invalidTags = [ + "", + " ", + ".", + "..", + "...", + ":", + ":value", + "tag:", + "tag.", + ".tag", + "tag..subtag:value", + "tag:no spaces in value", + ]; for (const tag of invalidTags) { expect(VALID_TAG_RE.test(tag)).toBeFalsy(); }