From 8c889fe52835f7053904e38fa22e4d80c5d2d381 Mon Sep 17 00:00:00 2001 From: Heikki Hellgren Date: Fri, 29 Nov 2024 14:49:53 +0200 Subject: [PATCH] fix: tests and route utility --- plugins/qeta-backend/src/service/routes/routeUtil.ts | 1 - plugins/qeta-common/src/tags.test.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/qeta-backend/src/service/routes/routeUtil.ts b/plugins/qeta-backend/src/service/routes/routeUtil.ts index 04e4d394..14c580c6 100644 --- a/plugins/qeta-backend/src/service/routes/routeUtil.ts +++ b/plugins/qeta-backend/src/service/routes/routeUtil.ts @@ -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); }; diff --git a/plugins/qeta-common/src/tags.test.ts b/plugins/qeta-common/src/tags.test.ts index 402e44cd..04a26f08 100644 --- a/plugins/qeta-common/src/tags.test.ts +++ b/plugins/qeta-common/src/tags.test.ts @@ -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);