Compress and combine emoji data (#5229)
This commit is contained in:
parent
eb5ac23434
commit
fd7f0732fe
22 changed files with 254 additions and 93 deletions
|
@ -1,5 +1,5 @@
|
|||
import { expect } from 'chai';
|
||||
import { search } from '../../../app/javascript/mastodon/emoji_index_light';
|
||||
import { search } from '../../../app/javascript/mastodon/features/emoji/emoji_mart_search_light';
|
||||
import { emojiIndex } from 'emoji-mart';
|
||||
import { pick } from 'lodash';
|
||||
|
||||
|
@ -78,4 +78,22 @@ describe('emoji_index', () => {
|
|||
expect(emojiIndex.search('flag', { include: ['people'] }))
|
||||
.to.deep.equal([]);
|
||||
});
|
||||
|
||||
it('does an emoji whose unified name is irregular', () => {
|
||||
let expected = [{
|
||||
'id': 'water_polo',
|
||||
'unified': '1f93d',
|
||||
'native': '🤽',
|
||||
}, {
|
||||
'id': 'man-playing-water-polo',
|
||||
'unified': '1f93d-200d-2642-fe0f',
|
||||
'native': '🤽♂️',
|
||||
}, {
|
||||
'id': 'woman-playing-water-polo',
|
||||
'unified': '1f93d-200d-2640-fe0f',
|
||||
'native': '🤽♀️',
|
||||
}];
|
||||
expect(search('polo').map(trimEmojis)).to.deep.equal(expected);
|
||||
expect(emojiIndex.search('polo').map(trimEmojis)).to.deep.equal(expected);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue