Skip to content

Commit

Permalink
fix: tests and route utility
Browse files Browse the repository at this point in the history
  • Loading branch information
drodil committed Nov 29, 2024
1 parent 21caf2e commit 8c889fe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion plugins/qeta-backend/src/service/routes/routeUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const getTags = (
allowedTags.includes(tag) || existingTags.tags.some(t => t.tag === tag),
);
}
console.log(tags);

return tags.slice(0, maxTags);
};
Expand Down
2 changes: 1 addition & 1 deletion plugins/qeta-common/src/tags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ describe('TAGS_REGEX', () => {
expect(TAGS_REGEX.test('tag-1')).toBe(true);
expect(TAGS_REGEX.test('tag_1')).toBe(true);
expect(TAGS_REGEX.test('tag+1')).toBe(true);
expect(TAGS_REGEX.test('tag#1')).toBe(true);
});

it('should not match invalid tags', () => {
expect(TAGS_REGEX.test('tag#1')).toBe(true);
expect(TAGS_REGEX.test('Tag')).toBe(false);
expect(TAGS_REGEX.test('tag!')).toBe(false);
expect(TAGS_REGEX.test('tag@')).toBe(false);
Expand Down

0 comments on commit 8c889fe

Please sign in to comment.