Skip to content

Commit

Permalink
feat(v15): Update emoji.yml and regex for Unicode v15 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdecked authored Dec 2, 2023
1 parent ab86be2 commit c11224a
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 3 deletions.
38 changes: 38 additions & 0 deletions src/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -809,4 +809,42 @@ describe('version spot checks', () => {
]);
});
});

describe('Emoji 15.0', () => {
test('single-codepoint leftward pushing hand with no skintone', () => {
expect(parse('\ud83e\udef7')).toMatchObject([
{
indices: [0, 2],
text: '\ud83e\udef7'
}
]);
});

test('single-codepoint rightward pushing hand with skintone', () => {
expect(parse('\ud83e\udef8\ud83c\udffb')).toMatchObject([
{
indices: [0, 4],
text: '\ud83e\udef8\ud83c\udffb'
}
]);
});

test('black bird', () => {
expect(parse('\ud83d\udc26\u200d\u2b1b')).toMatchObject([
{
indices: [0, 4],
text: '\ud83d\udc26\u200d\u2b1b'
}
]);
});

test('wing', () => {
expect(parse('\ud83e\udebd')).toMatchObject([
{
indices: [0, 2],
text: '\ud83e\udebd'
}
]);
});
});
});
Loading

0 comments on commit c11224a

Please sign in to comment.