@@ -51,7 +51,7 @@ metadata:
5151
5252 let context = await generate . generate ( devfileContent , editorContent ) ;
5353 // expect not to write the file
54- expect ( fsWriteFileSpy ) . not . toBeCalled ( ) ;
54+ expect ( fsWriteFileSpy ) . not . toHaveBeenCalled ( ) ;
5555 expect ( JSON . stringify ( context . devfile ) ) . toEqual (
5656 '{"schemaVersion":"2.2.0","metadata":{"name":"my-dummy-project"},"parent":{"id":"udi","registryUrl":"https://dummy-registry.io/","version":"1.2.0"}}' ,
5757 ) ;
@@ -118,7 +118,7 @@ metadata:
118118
119119 let context = await generate . generate ( devfileContent , editorContent ) ;
120120 // expect not to write the file
121- expect ( fsWriteFileSpy ) . not . toBeCalled ( ) ;
121+ expect ( fsWriteFileSpy ) . not . toHaveBeenCalled ( ) ;
122122 const expectedDevWorkspace = {
123123 apiVersion : 'workspace.devfile.io/v1alpha2' ,
124124 kind : 'DevWorkspace' ,
@@ -191,7 +191,7 @@ metadata:
191191
192192 let context = await generate . generate ( devfileContent , editorContent ) ;
193193 // expect not to write the file
194- expect ( fsWriteFileSpy ) . not . toBeCalled ( ) ;
194+ expect ( fsWriteFileSpy ) . not . toHaveBeenCalled ( ) ;
195195 const expectedDevWorkspace = {
196196 apiVersion : 'workspace.devfile.io/v1alpha2' ,
197197 kind : 'DevWorkspace' ,
@@ -259,7 +259,7 @@ metadata:
259259
260260 let context = await generate . generate ( devfileContent , editorContent ) ;
261261 // expect not to write the file
262- expect ( fsWriteFileSpy ) . not . toBeCalled ( ) ;
262+ expect ( fsWriteFileSpy ) . not . toHaveBeenCalled ( ) ;
263263 expect ( JSON . stringify ( context . devfile ) ) . toEqual (
264264 '{"schemaVersion":"2.2.0","metadata":{"name":"my-dummy-project"},"components":[{"name":"dev-container","mountSources":true,"container":{"image":"quay.io/foo/bar"}}]}' ,
265265 ) ;
@@ -323,7 +323,7 @@ metadata:
323323
324324 let context = await generate . generate ( devfileContent , editorContent ) ;
325325 // expect not to write the file
326- expect ( fsWriteFileSpy ) . not . toBeCalled ( ) ;
326+ expect ( fsWriteFileSpy ) . not . toHaveBeenCalled ( ) ;
327327 expect ( JSON . stringify ( context . devfile ) ) . toEqual (
328328 '{"schemaVersion":"2.2.0","metadata":{"generateName":"custom-project"},"components":[{"name":"dev-container","mountSources":true,"container":{"image":"quay.io/foo/bar"}}]}' ,
329329 ) ;
@@ -388,7 +388,7 @@ metadata:
388388
389389 let context = await generate . generate ( devfileContent , editorContent , fakeoutputDir ) ;
390390 // expect to write the file
391- expect ( fsWriteFileSpy ) . toBeCalled ( ) ;
391+ expect ( fsWriteFileSpy ) . toHaveBeenCalled ( ) ;
392392 expect ( JSON . stringify ( context . devfile ) ) . toEqual (
393393 '{"schemaVersion":"2.2.0","metadata":{"name":"my-dummy-project"},"components":[{"name":"dev-container","mountSources":true,"container":{"image":"quay.io/foo/bar"}}]}' ,
394394 ) ;
@@ -453,7 +453,7 @@ metadata:
453453
454454 let context = await generate . generate ( devfileContent , editorContent , fakeoutputDir , 'false' ) ;
455455 // expect to write the file
456- expect ( fsWriteFileSpy ) . toBeCalled ( ) ;
456+ expect ( fsWriteFileSpy ) . toHaveBeenCalled ( ) ;
457457 expect ( JSON . stringify ( context . devfile ) ) . toEqual (
458458 '{"schemaVersion":"2.2.0","metadata":{"name":"my-dummy-project"},"components":[{"name":"dev-container","attributes":{"old":"attribute"},"mountSources":true,"container":{"image":"quay.io/foo/bar"}}]}' ,
459459 ) ;
@@ -519,7 +519,7 @@ metadata:
519519
520520 let context = await generate . generate ( devfileContent , editorContent , fakeoutputDir , 'false' ) ;
521521 // expect to write the file
522- expect ( fsWriteFileSpy ) . toBeCalled ( ) ;
522+ expect ( fsWriteFileSpy ) . toHaveBeenCalled ( ) ;
523523 expect ( context . suffix ) . toEqual ( '' ) ;
524524 } ) ;
525525 } ) ;
0 commit comments