@@ -21,6 +21,7 @@ describe('utils', () => {
2121
2222 test ( 'should pass if same word but wrong case and using ignoreCase' , ( ) => {
2323 expect ( compareText ( ' FOO ' , 'foo' , { ignoreCase : true } ) . result ) . toBe ( true )
24+ expect ( compareText ( ' foo ' , 'FOO' , { ignoreCase : true } ) . result ) . toBe ( true )
2425 } )
2526
2627 test ( 'should pass if string contains expected and using containing' , ( ) => {
@@ -31,6 +32,14 @@ describe('utils', () => {
3132 expect ( compareText ( 'foo' , expect . stringContaining ( 'oo' ) , { } ) . result ) . toBe ( true )
3233 expect ( compareText ( 'foo' , expect . not . stringContaining ( 'oo' ) , { } ) . result ) . toBe ( false )
3334 } )
35+
36+ test ( 'should support asymmetric matchers and using ignoreCase' , ( ) => {
37+ expect ( compareText ( ' FOO ' , expect . stringContaining ( 'foo' ) , { ignoreCase : true } ) . result ) . toBe ( true )
38+ expect ( compareText ( ' FOO ' , expect . not . stringContaining ( 'foo' ) , { ignoreCase : true } ) . result ) . toBe ( false )
39+ expect ( compareText ( ' Foo ' , expect . stringContaining ( 'FOO' ) , { ignoreCase : true } ) . result ) . toBe ( true )
40+ expect ( compareText ( ' Foo ' , expect . not . stringContaining ( 'FOO' ) , { ignoreCase : true } ) . result ) . toBe ( false )
41+ expect ( compareText ( ' foo ' , expect . stringContaining ( 'foo' ) , { ignoreCase : true } ) . result ) . toBe ( true )
42+ } )
3443 } )
3544
3645 describe ( 'compareTextWithArray' , ( ) => {
0 commit comments