mirror of
https://gitea.com/gitea/gitea-mirror.git
synced 2026-03-20 11:50:27 +00:00
Update emoji data for Unicode 16 (#36596)
Use emoji data from https://github.com/github/gemoji/pull/303 because `github/gemoji` is unmaintained. `assets/emoji.json` is now pretty-printed so that future diffs will actually be readable. This causes no isses as the only place where it is used is in frontend which imports it via `with {type: 'json'}` where whitespace is irrelevant. <img width="205" height="75" alt="image" src="https://github.com/user-attachments/assets/96e335b8-acf6-4996-ace4-824c0870a7d3" /> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,47 +1,59 @@
|
||||
import {matchEmoji, matchMention} from './match.ts';
|
||||
|
||||
test('matchEmoji', () => {
|
||||
expect(matchEmoji('')).toEqual([
|
||||
'+1',
|
||||
'-1',
|
||||
'100',
|
||||
'1234',
|
||||
'1st_place_medal',
|
||||
'2nd_place_medal',
|
||||
]);
|
||||
expect(matchEmoji('')).toMatchInlineSnapshot(`
|
||||
[
|
||||
"+1",
|
||||
"-1",
|
||||
"100",
|
||||
"1234",
|
||||
"1st_place_medal",
|
||||
"2nd_place_medal",
|
||||
]
|
||||
`);
|
||||
|
||||
expect(matchEmoji('hea')).toEqual([
|
||||
'headphones',
|
||||
'headstone',
|
||||
'health_worker',
|
||||
'hear_no_evil',
|
||||
'heard_mcdonald_islands',
|
||||
'heart',
|
||||
]);
|
||||
expect(matchEmoji('hea')).toMatchInlineSnapshot(`
|
||||
[
|
||||
"head_shaking_horizontally",
|
||||
"head_shaking_vertically",
|
||||
"headphones",
|
||||
"headstone",
|
||||
"health_worker",
|
||||
"hear_no_evil",
|
||||
]
|
||||
`);
|
||||
|
||||
expect(matchEmoji('hear')).toEqual([
|
||||
'hear_no_evil',
|
||||
'heard_mcdonald_islands',
|
||||
'heart',
|
||||
'heart_decoration',
|
||||
'heart_eyes',
|
||||
'heart_eyes_cat',
|
||||
]);
|
||||
expect(matchEmoji('hear')).toMatchInlineSnapshot(`
|
||||
[
|
||||
"hear_no_evil",
|
||||
"heard_mcdonald_islands",
|
||||
"heart",
|
||||
"heart_decoration",
|
||||
"heart_eyes",
|
||||
"heart_eyes_cat",
|
||||
]
|
||||
`);
|
||||
|
||||
expect(matchEmoji('poo')).toEqual([
|
||||
'poodle',
|
||||
'hankey',
|
||||
'spoon',
|
||||
'bowl_with_spoon',
|
||||
]);
|
||||
expect(matchEmoji('poo')).toMatchInlineSnapshot(`
|
||||
[
|
||||
"poodle",
|
||||
"hankey",
|
||||
"spoon",
|
||||
"bowl_with_spoon",
|
||||
]
|
||||
`);
|
||||
|
||||
expect(matchEmoji('1st_')).toEqual([
|
||||
'1st_place_medal',
|
||||
]);
|
||||
expect(matchEmoji('1st_')).toMatchInlineSnapshot(`
|
||||
[
|
||||
"1st_place_medal",
|
||||
]
|
||||
`);
|
||||
|
||||
expect(matchEmoji('jellyfis')).toEqual([
|
||||
'jellyfish',
|
||||
]);
|
||||
expect(matchEmoji('jellyfis')).toMatchInlineSnapshot(`
|
||||
[
|
||||
"jellyfish",
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
||||
test('matchMention', () => {
|
||||
|
||||
Reference in New Issue
Block a user