Skip to content

Commit 3e61457

Browse files
committed
feat(v15.1): Generate updated regex for Emoji 15.1 & add JS Emoji 15.1 spot tests
1 parent 4a99acb commit 3e61457

File tree

3 files changed

+6828
-6660
lines changed

3 files changed

+6828
-6660
lines changed

src/__tests__/index.test.js

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,4 +847,125 @@ describe('version spot checks', () => {
847847
]);
848848
});
849849
});
850+
851+
describe('Emoji 15.1', () => {
852+
test('head shaking horizontally', () => {
853+
expect(parse('\ud83d\ude42\u200d\u2194\ufe0f')).toMatchObject([
854+
{
855+
indices: [0, 5],
856+
text: '\ud83d\ude42\u200d\u2194\ufe0f'
857+
}
858+
]);
859+
});
860+
861+
test('head shaking vertically', () => {
862+
expect(parse('\ud83d\ude42\u200d\u2195\ufe0f')).toMatchObject([
863+
{
864+
indices: [0, 5],
865+
text: '\ud83d\ude42\u200d\u2195\ufe0f'
866+
}
867+
]);
868+
});
869+
870+
describe('directional diversity emoji', () => {
871+
test('person walking facing right (trailing gender without variant, directional)', () => {
872+
expect(parse('\ud83d\udeb6\u200d\u27a1\ufe0f')).toMatchObject([
873+
{
874+
indices: [0, 5],
875+
text: '\ud83d\udeb6\u200d\u27a1\ufe0f'
876+
}
877+
]);
878+
});
879+
880+
test('person walking facing right, medium skin tone', () => {
881+
expect(parse('\ud83d\udeb6\ud83c\udffd\u200d\u27a1\ufe0f')).toMatchObject([
882+
{
883+
indices: [0, 7],
884+
text: '\ud83d\udeb6\ud83c\udffd\u200d\u27a1\ufe0f'
885+
}
886+
]);
887+
});
888+
889+
test('woman walking facing right, medium skin tone', () => {
890+
expect(parse('\ud83d\udeb6\ud83c\udffd\u200d\u2640\ufe0f\u200d\u27a1\ufe0f')).toMatchObject([
891+
{
892+
indices: [0, 10],
893+
text: '\ud83d\udeb6\ud83c\udffd\u200d\u2640\ufe0f\u200d\u27a1\ufe0f'
894+
}
895+
]);
896+
});
897+
898+
test('man walking (trailing gender without variant)', () => {
899+
expect(parse('\ud83d\udeb6\u200d\u2642\ufe0f')).toMatchObject([
900+
{
901+
indices: [0, 5],
902+
text: '\ud83d\udeb6\u200d\u2642\ufe0f'
903+
}
904+
]);
905+
});
906+
907+
test('woman with white cane facing right (leading gender, directional)', () => {
908+
expect(parse('\ud83d\udc69\u200d\ud83e\uddaf\u200d\u27a1\ufe0f')).toMatchObject([
909+
{
910+
indices: [0, 8],
911+
text: '\ud83d\udc69\u200d\ud83e\uddaf\u200d\u27a1\ufe0f'
912+
}
913+
]);
914+
});
915+
916+
test('person with white cane facing right, medium skin tone', () => {
917+
expect(parse('\ud83e\uddd1\ud83c\udffd\u200d\ud83e\uddaf\u200d\u27a1\ufe0f')).toMatchObject([
918+
{
919+
indices: [0, 10],
920+
text: '\ud83e\uddd1\ud83c\udffd\u200d\ud83e\uddaf\u200d\u27a1\ufe0f'
921+
}
922+
]);
923+
});
924+
925+
test('man with white cane facing right, medium skin tone', () => {
926+
expect(parse('\ud83d\udc68\ud83c\udffd\u200d\ud83e\uddaf\u200d\u27a1\ufe0f')).toMatchObject([
927+
{
928+
indices: [0, 10],
929+
text: '\ud83d\udc68\ud83c\udffd\u200d\ud83e\uddaf\u200d\u27a1\ufe0f'
930+
}
931+
]);
932+
});
933+
934+
test('person with white cane (leading gender)', () => {
935+
expect(parse('\ud83e\uddd1\u200d\ud83e\uddaf')).toMatchObject([
936+
{
937+
indices: [0, 5],
938+
text: '\ud83e\uddd1\u200d\ud83e\uddaf'
939+
}
940+
]);
941+
});
942+
});
943+
944+
test('family: adult, adult, child, child', () => {
945+
expect(parse('\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2')).toMatchObject([
946+
{
947+
indices: [0, 11],
948+
text: '\ud83e\uddd1\u200d\ud83e\uddd1\u200d\ud83e\uddd2\u200d\ud83e\uddd2'
949+
}
950+
]);
951+
});
952+
953+
test('phoenix', () => {
954+
expect(parse('\ud83d\udc26\u200d\ud83d\udd25')).toMatchObject([
955+
{
956+
indices: [0, 5],
957+
text: '\ud83d\udc26\u200d\ud83d\udd25'
958+
}
959+
]);
960+
});
961+
962+
test('broken chain', () => {
963+
expect(parse('\u26d3\ufe0f\u200d\ud83d\udca5')).toMatchObject([
964+
{
965+
indices: [0, 5],
966+
text: '\u26d3\ufe0f\u200d\ud83d\udca5'
967+
}
968+
]);
969+
});
970+
});
850971
});

0 commit comments

Comments
 (0)