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).
This commit is contained in:
Gusted 2025-08-10 22:53:45 +02:00
commit 4237603dd6
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -30,7 +30,7 @@ test('matchEmoji', () => {
expect(matchEmoji('poo')).toEqual([ expect(matchEmoji('poo')).toEqual([
'poodle', 'poodle',
'hankey', 'poop',
'spoon', 'spoon',
'bowl_with_spoon', 'bowl_with_spoon',
]); ]);
@ -42,6 +42,19 @@ test('matchEmoji', () => {
expect(matchEmoji('jellyfis')).toEqual([ expect(matchEmoji('jellyfis')).toEqual([
'jellyfish', 'jellyfish',
]); ]);
expect(matchEmoji('forge')).toEqual([
'forgejo',
]);
expect(matchEmoji('frog')).toEqual([
'frog',
'frogejo',
]);
expect(matchEmoji('blob')).toEqual([
'blobnom',
]);
}); });
test('matchMention', () => { test('matchMention', () => {