File tree Expand file tree Collapse file tree 3 files changed +44
-2
lines changed
Expand file tree Collapse file tree 3 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "license" : " MIT" ,
33 "name" : " twemoji-parser" ,
4- "version" : " 13.1 .0" ,
4+ "version" : " 14.0 .0" ,
55 "description" : " Parser for identifying Twemoji in text" ,
66 "main" : " dist/index.js" ,
77 "files" : [
Original file line number Diff line number Diff line change @@ -767,4 +767,46 @@ describe('version spot checks', () => {
767767 ] ) ;
768768 } ) ;
769769 } ) ;
770+
771+ describe ( 'Emoji 14.0' , ( ) => {
772+ test ( 'single-codepoint handshake with no skintones' , ( ) => {
773+ expect ( parse ( '\ud83e\udd1d' ) ) . toMatchObject ( [
774+ {
775+ indices : [ 0 , 2 ] ,
776+ text : '\ud83e\udd1d'
777+ }
778+ ] ) ;
779+ } ) ;
780+
781+ test ( 'single-codepoint handshake with both hands the same skintone' , ( ) => {
782+ expect ( parse ( '\ud83e\udd1d\ud83c\udffe' ) ) . toMatchObject ( [
783+ {
784+ indices : [ 0 , 4 ] ,
785+ text : '\ud83e\udd1d\ud83c\udffe'
786+ }
787+ ] ) ;
788+ } ) ;
789+
790+ test ( 'multi-codepoint handshake with different skintones' , ( ) => {
791+ expect ( parse ( '\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c\udffd' ) ) . toMatchObject ( [
792+ {
793+ indices : [ 0 , 9 ] ,
794+ text : '\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c\udffd'
795+ }
796+ ] ) ;
797+ } ) ;
798+
799+ test ( 'multi-codepoint handshake with same skintone is unrecognized' , ( ) => {
800+ expect ( parse ( '\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c\udffd' ) ) . toMatchObject ( [
801+ {
802+ indices : [ 0 , 4 ] ,
803+ text : '\ud83e\udef1\ud83c\udffd'
804+ } ,
805+ {
806+ indices : [ 5 , 9 ] ,
807+ text : '\ud83e\udef2\ud83c\udffd'
808+ }
809+ ] ) ;
810+ } ) ;
811+ } ) ;
770812} ) ;
You can’t perform that action at this time.
0 commit comments