Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cronvel committed Aug 2, 2022
1 parent 3086589 commit e6051b5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/unicode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,17 @@ describe( "Unicode" , () => {
expect( string.unicode.isFullWidth( '䷆' ) ).to.be( false ) ;
expect( string.unicode.isFullWidth( '🔴' ) ).to.be( true ) ;
expect( string.unicode.isFullWidth( '😀' ) ).to.be( true ) ;

expect( string.unicode.isFullWidth( '@@' ) ).to.be( true ) ;
expect( string.unicode.isFullWidth( 'a@' ) ).to.be( false ) ;
expect( string.unicode.isFullWidth( '@a' ) ).to.be( true ) ;
} ) ;

it.optional( "unicode.isFullWidth() and emojis that are normal-size (UNDETECTED YET)" , () => {
expect( string.unicode.isFullWidth( '♡' ) ).to.be( false ) ;
expect( string.unicode.isFullWidth( '♥️' ) ).to.be( false ) ;
} ) ;

it( "unicode.isDiacritic()" , () => {
expect( string.unicode.isZeroWidthDiacritic( 'a' ) ).to.be( false ) ;
expect( string.unicode.isZeroWidthDiacritic( 'อั' ) ).to.be( false ) ;
Expand All @@ -202,6 +207,8 @@ describe( "Unicode" , () => {
expect( string.unicode.isEmoji( '䷆' ) ).to.be( false ) ;
expect( string.unicode.isEmoji( '🔴' ) ).to.be( true ) ;
expect( string.unicode.isEmoji( '😀' ) ).to.be( true ) ;
expect( string.unicode.isEmoji( '♡' ) ).to.be( true ) ;
expect( string.unicode.isEmoji( '♥️' ) ).to.be( true ) ;
} ) ;

it( ".toFullWidth() should transform a character to its full-width variant, if it exist" , () => {
Expand Down

0 comments on commit e6051b5

Please sign in to comment.