@@ -43,7 +43,7 @@ describe('@ionic/cli-framework', () => {
43
43
const config = new Config ( '/path/to/file' ) ;
44
44
config . c = { } ;
45
45
expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledTimes ( 1 ) ;
46
- expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{}' ) ;
46
+ expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{}\n ' ) ;
47
47
} ) ;
48
48
49
49
it ( 'should call readFileSync upon getting c' , ( ) => {
@@ -144,7 +144,7 @@ describe('@ionic/cli-framework', () => {
144
144
jest . spyOn ( config , 'provideDefaults' ) . mockImplementation ( ( ) => ( { } ) ) ;
145
145
config . set ( 'foo' , 5 ) ;
146
146
expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledTimes ( 1 ) ;
147
- expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{\n "foo": 5\n}' ) ;
147
+ expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{\n "foo": 5\n}\n ' ) ;
148
148
} ) ;
149
149
150
150
it ( 'should unset value in file' , ( ) => {
@@ -153,7 +153,7 @@ describe('@ionic/cli-framework', () => {
153
153
jest . spyOn ( config , 'provideDefaults' ) . mockImplementation ( ( ) => ( { } ) ) ;
154
154
config . unset ( 'foo' ) ;
155
155
expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledTimes ( 1 ) ;
156
- expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{}' ) ;
156
+ expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{}\n ' ) ;
157
157
} ) ;
158
158
159
159
} ) ;
@@ -289,7 +289,7 @@ describe('@ionic/cli-framework', () => {
289
289
jest . spyOn ( config , 'provideDefaults' ) . mockImplementation ( ( ) => ( { } ) ) ;
290
290
config . set ( 'foo' , 5 ) ;
291
291
expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledTimes ( 1 ) ;
292
- expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{\n "sub": {\n "foo": 5\n }\n}' ) ;
292
+ expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{\n "sub": {\n "foo": 5\n }\n}\n ' ) ;
293
293
} ) ;
294
294
295
295
it ( 'should unset value in file' , ( ) => {
@@ -298,7 +298,7 @@ describe('@ionic/cli-framework', () => {
298
298
jest . spyOn ( config , 'provideDefaults' ) . mockImplementation ( ( ) => ( { } ) ) ;
299
299
config . unset ( 'foo' ) ;
300
300
expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledTimes ( 1 ) ;
301
- expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{\n "sub": {}\n}' ) ;
301
+ expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{\n "sub": {}\n}\n ' ) ;
302
302
} ) ;
303
303
304
304
} ) ;
0 commit comments