@@ -120,14 +120,13 @@ describe('patch/create', function() {
120
120
+ '\\ No newline at end of file\n' ) ;
121
121
} ) ;
122
122
123
- it ( 'should output only one "no newline" at end of file message on empty file' , function ( ) {
123
+ it ( 'should output no "no newline" at end of file message on empty file' , function ( ) {
124
124
expect ( createPatch ( 'test' , '' , 'line1\nline2\nline3\nline4' , 'header1' , 'header2' ) ) . to . equal (
125
125
'Index: test\n'
126
126
+ '===================================================================\n'
127
127
+ '--- test\theader1\n'
128
128
+ '+++ test\theader2\n'
129
- + '@@ -1,0 +1,4 @@\n'
130
- + '\\ No newline at end of file\n'
129
+ + '@@ -0,0 +1,4 @@\n'
131
130
+ '+line1\n'
132
131
+ '+line2\n'
133
132
+ '+line3\n'
@@ -139,7 +138,7 @@ describe('patch/create', function() {
139
138
+ '===================================================================\n'
140
139
+ '--- test\theader1\n'
141
140
+ '+++ test\theader2\n'
142
- + '@@ -1,4 +1 ,0 @@\n'
141
+ + '@@ -1,4 +0 ,0 @@\n'
143
142
+ '-line1\n'
144
143
+ '-line2\n'
145
144
+ '-line3\n'
@@ -528,7 +527,7 @@ describe('patch/create', function() {
528
527
expect ( diffResult ) . to . equal ( expectedResult ) ;
529
528
} ) ;
530
529
531
- it ( 'should generatea a patch with context size 0' , function ( ) {
530
+ it ( 'should generate a patch with context size 0' , function ( ) {
532
531
const expectedResult =
533
532
'Index: testFileName\n'
534
533
+ '===================================================================\n'
@@ -538,11 +537,11 @@ describe('patch/create', function() {
538
537
+ '-value\n'
539
538
+ '+new value\n'
540
539
+ '+new value 2\n'
541
- + '@@ -11,1 +12 ,0 @@\n'
540
+ + '@@ -11,1 +11 ,0 @@\n'
542
541
+ '-remove value\n'
543
- + '@@ -21,1 +21 ,0 @@\n'
542
+ + '@@ -21,1 +20 ,0 @@\n'
544
543
+ '-remove value\n'
545
- + '@@ -30 ,0 +29,1 @@\n'
544
+ + '@@ -29 ,0 +29,1 @@\n'
546
545
+ '+add value\n'
547
546
+ '@@ -34,1 +34,2 @@\n'
548
547
+ '-value\n'
0 commit comments