From 4237603dd68e13c4e37f1614f1966a5f2a4bd369 Mon Sep 17 00:00:00 2001 From: Gusted Date: Sun, 10 Aug 2025 22:53:45 +0200 Subject: [PATCH] chore: add JS unit test Add a test to show that `matchEmoji` is aware of custom emojis. Also changes how aliases are handled (aliases are no longer correlated to each other and there's no preference for the main alias). --- web_src/js/utils/match.test.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/web_src/js/utils/match.test.js b/web_src/js/utils/match.test.js index 1e30b451d4..4910af1d3c 100644 --- a/web_src/js/utils/match.test.js +++ b/web_src/js/utils/match.test.js @@ -30,7 +30,7 @@ test('matchEmoji', () => { expect(matchEmoji('poo')).toEqual([ 'poodle', - 'hankey', + 'poop', 'spoon', 'bowl_with_spoon', ]); @@ -42,6 +42,19 @@ test('matchEmoji', () => { expect(matchEmoji('jellyfis')).toEqual([ 'jellyfish', ]); + + expect(matchEmoji('forge')).toEqual([ + 'forgejo', + ]); + + expect(matchEmoji('frog')).toEqual([ + 'frog', + 'frogejo', + ]); + + expect(matchEmoji('blob')).toEqual([ + 'blobnom', + ]); }); test('matchMention', () => {