@@ -94,7 +94,7 @@ describe('Anagram', () => {
9494
9595 xit ( 'does not detect an anagram if the original word is repeated' , ( ) => {
9696 const subject = new Anagram ( 'go' )
97- const matches = subject . matches ( 'go Go GO ' )
97+ const matches = subject . matches ( 'goGoGO ' )
9898 const expected = [ ]
9999
100100 expect ( areSetsEqual ( new Set ( expected ) , new Set ( matches ) ) ) . toEqual ( true )
@@ -140,6 +140,22 @@ describe('Anagram', () => {
140140 expect ( areSetsEqual ( new Set ( expected ) , new Set ( matches ) ) ) . toEqual ( true )
141141 } )
142142
143+ xit ( 'handles case of greek letters' , ( ) => {
144+ const subject = new Anagram ( 'ΑΒΓ' )
145+ const matches = subject . matches ( 'ΒΓΑ' , 'ΒΓΔ' , 'γβα' , 'αβγ' )
146+ const expected = [ 'ΒΓΑ' , 'γβα' ]
147+
148+ expect ( areSetsEqual ( new Set ( expected ) , new Set ( matches ) ) ) . toEqual ( true )
149+ } )
150+
151+ xit ( 'different characters may have the same bytes' , ( ) => {
152+ const subject = new Anagram ( 'a⬂' )
153+ const matches = subject . matches ( '€a' )
154+ const expected = [ ]
155+
156+ expect ( areSetsEqual ( new Set ( expected ) , new Set ( matches ) ) ) . toEqual ( true )
157+ } )
158+
143159 xit ( 'matches() accepts string arguments' , ( ) => {
144160 const subject = new Anagram ( 'ant' )
145161 const matches = subject . matches ( 'stand' , 'tan' , 'at' )
0 commit comments