mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-13 06:17:26 +00:00
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:
parent
fe5f16205f
commit
4237603dd6
1 changed files with 14 additions and 1 deletions
|
@ -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', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue