@@ -5,31 +5,31 @@ describe('Utils', () => {
55 describe ( 'escapeForHtml' , ( ) => {
66 it ( 'should escape & with &' , ( ) => {
77 const result = escapeForHtml ( '&' ) ;
8- expect ( result ) . toEqual ( '&' ) ;
8+ expect ( result ) . toBe ( '&' ) ;
99 } ) ;
1010 it ( 'should escape < with <' , ( ) => {
1111 const result = escapeForHtml ( '<' ) ;
12- expect ( result ) . toEqual ( '<' ) ;
12+ expect ( result ) . toBe ( '<' ) ;
1313 } ) ;
1414 it ( 'should escape > with >' , ( ) => {
1515 const result = escapeForHtml ( '>' ) ;
16- expect ( result ) . toEqual ( '>' ) ;
16+ expect ( result ) . toBe ( '>' ) ;
1717 } ) ;
1818 it ( 'should escape " with "' , ( ) => {
1919 const result = escapeForHtml ( '"' ) ;
20- expect ( result ) . toEqual ( '"' ) ;
20+ expect ( result ) . toBe ( '"' ) ;
2121 } ) ;
2222 it ( "should escape ' with '" , ( ) => {
2323 const result = escapeForHtml ( "'" ) ;
24- expect ( result ) . toEqual ( ''' ) ;
24+ expect ( result ) . toBe ( ''' ) ;
2525 } ) ;
2626 it ( 'should escape / with /' , ( ) => {
2727 const result = escapeForHtml ( '/' ) ;
28- expect ( result ) . toEqual ( '/' ) ;
28+ expect ( result ) . toBe ( '/' ) ;
2929 } ) ;
3030 it ( 'should escape a string containing HTML code' , ( ) => {
3131 const result = escapeForHtml ( `<a href="/search?q=diff2html">Search 'Diff2Html'</a>` ) ;
32- expect ( result ) . toEqual (
32+ expect ( result ) . toBe (
3333 '<a href="/search?q=diff2html">Search 'Diff2Html'</a>' ,
3434 ) ;
3535 } ) ;
@@ -41,7 +41,7 @@ describe('Utils', () => {
4141 oldName : 'sample.js' ,
4242 newName : 'sample.js' ,
4343 } ) ;
44- expect ( result ) . toEqual ( 'd2h-960013' ) ;
44+ expect ( result ) . toBe ( 'd2h-960013' ) ;
4545 } ) ;
4646 } ) ;
4747
@@ -51,49 +51,49 @@ describe('Utils', () => {
5151 oldName : 'sample.js' ,
5252 newName : 'sample.js' ,
5353 } ) ;
54- expect ( result ) . toEqual ( 'sample.js' ) ;
54+ expect ( result ) . toBe ( 'sample.js' ) ;
5555 } ) ;
5656 it ( 'should generate the file name for a changed file and full rename' , ( ) => {
5757 const result = filenameDiff ( {
5858 oldName : 'sample1.js' ,
5959 newName : 'sample2.js' ,
6060 } ) ;
61- expect ( result ) . toEqual ( 'sample1.js → sample2.js' ) ;
61+ expect ( result ) . toBe ( 'sample1.js → sample2.js' ) ;
6262 } ) ;
6363 it ( 'should generate the file name for a changed file and prefix rename' , ( ) => {
6464 const result = filenameDiff ( {
6565 oldName : 'src/path/sample.js' ,
6666 newName : 'source/path/sample.js' ,
6767 } ) ;
68- expect ( result ) . toEqual ( '{src → source}/path/sample.js' ) ;
68+ expect ( result ) . toBe ( '{src → source}/path/sample.js' ) ;
6969 } ) ;
7070 it ( 'should generate the file name for a changed file and suffix rename' , ( ) => {
7171 const result = filenameDiff ( {
7272 oldName : 'src/path/sample1.js' ,
7373 newName : 'src/path/sample2.js' ,
7474 } ) ;
75- expect ( result ) . toEqual ( 'src/path/{sample1.js → sample2.js}' ) ;
75+ expect ( result ) . toBe ( 'src/path/{sample1.js → sample2.js}' ) ;
7676 } ) ;
7777 it ( 'should generate the file name for a changed file and middle rename' , ( ) => {
7878 const result = filenameDiff ( {
7979 oldName : 'src/really/big/path/sample.js' ,
8080 newName : 'src/small/path/sample.js' ,
8181 } ) ;
82- expect ( result ) . toEqual ( 'src/{really/big → small}/path/sample.js' ) ;
82+ expect ( result ) . toBe ( 'src/{really/big → small}/path/sample.js' ) ;
8383 } ) ;
8484 it ( 'should generate the file name for a deleted file' , ( ) => {
8585 const result = filenameDiff ( {
8686 oldName : 'src/my/file.js' ,
8787 newName : '/dev/null' ,
8888 } ) ;
89- expect ( result ) . toEqual ( 'src/my/file.js' ) ;
89+ expect ( result ) . toBe ( 'src/my/file.js' ) ;
9090 } ) ;
9191 it ( 'should generate the file name for a new file' , ( ) => {
9292 const result = filenameDiff ( {
9393 oldName : '/dev/null' ,
9494 newName : 'src/my/file.js' ,
9595 } ) ;
96- expect ( result ) . toEqual ( 'src/my/file.js' ) ;
96+ expect ( result ) . toBe ( 'src/my/file.js' ) ;
9797 } ) ;
9898 } ) ;
9999
0 commit comments