File tree Expand file tree Collapse file tree
packages/contentstack-export/test/unit/export/modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -482,18 +482,16 @@ describe('ExportStack', () => {
482482 description : 'Settings description' ,
483483 settings : { global : { example : 'value' } } ,
484484 } ;
485+ const expectedSettings = { ...settingsData , am_v2 : { linked_workspaces : [ ] as any [ ] } } ;
485486 mockStackClient . settings = sinon . stub ( ) . resolves ( settingsData ) ;
486487
487488 const result = await exportStack . exportStackSettings ( ) ;
488489
489- expect ( writeFileStub . called ) . to . be . true ;
490- expect ( makeDirectoryStub . called ) . to . be . true ;
491- // Should return the settings data
492- expect ( result ) . to . deep . equal ( settingsData ) ;
493- // Verify file was written with correct path
494- const writeCall = writeFileStub . getCall ( 0 ) ;
490+ expect ( result ) . to . deep . equal ( expectedSettings ) ;
491+ const writeCall = writeFileStub . firstCall ;
495492 expect ( writeCall . args [ 0 ] ) . to . include ( 'settings.json' ) ;
496- expect ( writeCall . args [ 1 ] ) . to . deep . equal ( settingsData ) ;
493+ expect ( writeCall . args [ 1 ] ) . to . deep . equal ( expectedSettings ) ;
494+ expect ( makeDirectoryStub . firstCall ) . to . not . be . null ;
497495 } ) ;
498496
499497 it ( 'should handle errors when exporting settings without throwing' , async ( ) => {
You can’t perform that action at this time.
0 commit comments