@@ -11,34 +11,34 @@ test('Returns an array', t => {
1111} ) ;
1212
1313test ( 'Works with matching groups' , t => {
14- t . same (
14+ t . deepEqual (
1515 replaceString ( 'hey there' , / ( h e y ) / g, x => ( { worked : x } ) ) ,
1616 [ '' , { worked : 'hey' } , ' there' ]
1717 ) ;
1818} ) ;
1919
2020test ( 'Works with strings' , t => {
21- t . same (
21+ t . deepEqual (
2222 replaceString ( 'hey there' , 'hey' , x => ( { worked : x } ) ) ,
2323 [ '' , { worked : 'hey' } , ' there' ]
2424 ) ;
2525} ) ;
2626
2727test ( 'Works with arrays' , t => {
2828 const input = [ 'hey there' , { value : 'you' } , 'again' ] ;
29- t . same (
29+ t . deepEqual (
3030 replaceString ( input , 'hey' , x => ( { worked : x } ) ) ,
3131 [ '' , { worked : 'hey' } , ' there' , { value : 'you' } , 'again' ]
3232 ) ;
3333} ) ;
3434
3535test ( 'Successfully escapes parens in strings' , t => {
36- t . same (
36+ t . deepEqual (
3737 replaceString ( '(hey) there' , '(hey)' , x => ( { worked : x } ) ) ,
3838 [ '' , { worked : '(hey)' } , ' there' ]
3939 ) ;
4040
41- t . same (
41+ t . deepEqual (
4242 replaceString ( 'hey ((y)(you)) there' , '((y)(you))' , x => ( { worked : x } ) ) ,
4343 [ 'hey ' , { worked : '((y)(you))' } , ' there' ]
4444 ) ;
@@ -53,7 +53,7 @@ test('Can be called consecutively on returned result of previous call', t => {
5353 { type : 'url' , value : match }
5454 ) ) ;
5555
56- t . same ( reactReplacedTweet , [
56+ t . deepEqual ( reactReplacedTweet , [
5757 'Hey @iansinnott, check out this link ' ,
5858 { type : 'url' , value : 'https://github.com/iansinnott/' } ,
5959 ' Hope to see you at #reactconf' ,
@@ -64,7 +64,7 @@ test('Can be called consecutively on returned result of previous call', t => {
6464 { type : 'mention' , value : match }
6565 ) ) ;
6666
67- t . same ( reactReplacedTweet , [
67+ t . deepEqual ( reactReplacedTweet , [
6868 'Hey ' ,
6969 { type : 'mention' , value : '@iansinnott' } ,
7070 ', check out this link ' ,
@@ -77,7 +77,7 @@ test('Can be called consecutively on returned result of previous call', t => {
7777 { type : 'hashtag' , value : match }
7878 ) ) ;
7979
80- t . same ( reactReplacedTweet , [
80+ t . deepEqual ( reactReplacedTweet , [
8181 'Hey ' ,
8282 { type : 'mention' , value : '@iansinnott' } ,
8383 ', check out this link ' ,
0 commit comments