@@ -43,7 +43,7 @@ describe('@ionic/cli-framework', () => {
4343 const config = new Config ( '/path/to/file' ) ;
4444 config . c = { } ;
4545 expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledTimes ( 1 ) ;
46- expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{}' ) ;
46+ expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{}\n ' ) ;
4747 } ) ;
4848
4949 it ( 'should call readFileSync upon getting c' , ( ) => {
@@ -144,7 +144,7 @@ describe('@ionic/cli-framework', () => {
144144 jest . spyOn ( config , 'provideDefaults' ) . mockImplementation ( ( ) => ( { } ) ) ;
145145 config . set ( 'foo' , 5 ) ;
146146 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 ' ) ;
148148 } ) ;
149149
150150 it ( 'should unset value in file' , ( ) => {
@@ -153,7 +153,7 @@ describe('@ionic/cli-framework', () => {
153153 jest . spyOn ( config , 'provideDefaults' ) . mockImplementation ( ( ) => ( { } ) ) ;
154154 config . unset ( 'foo' ) ;
155155 expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledTimes ( 1 ) ;
156- expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{}' ) ;
156+ expect ( mockWriteFileAtomicSync ) . toHaveBeenCalledWith ( '/path/to/file' , '{}\n ' ) ;
157157 } ) ;
158158
159159 } ) ;
@@ -289,7 +289,7 @@ describe('@ionic/cli-framework', () => {
289289 jest . spyOn ( config , 'provideDefaults' ) . mockImplementation ( ( ) => ( { } ) ) ;
290290 config . set ( 'foo' , 5 ) ;
291291 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 ' ) ;
293293 } ) ;
294294
295295 it ( 'should unset value in file' , ( ) => {
@@ -298,7 +298,7 @@ describe('@ionic/cli-framework', () => {
298298 jest . spyOn ( config , 'provideDefaults' ) . mockImplementation ( ( ) => ( { } ) ) ;
299299 config . unset ( 'foo' ) ;
300300 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 ' ) ;
302302 } ) ;
303303
304304 } ) ;
0 commit comments