@@ -128,7 +128,7 @@ describe('BaseNodeController (e2e) /api/base/:baseId/node', () => {
128128
129129 afterEach ( async ( ) => {
130130 // Cleanup created nodes
131- for ( const nodeId of nodesToCleanup ) {
131+ for ( const nodeId of [ ... nodesToCleanup ] . reverse ( ) ) {
132132 await deleteBaseNode ( baseId , nodeId ) ;
133133 }
134134 nodesToCleanup . length = 0 ;
@@ -404,7 +404,7 @@ describe('BaseNodeController (e2e) /api/base/:baseId/node', () => {
404404 const nodesToCleanup : string [ ] = [ ] ;
405405
406406 afterEach ( async ( ) => {
407- for ( const nodeId of nodesToCleanup ) {
407+ for ( const nodeId of [ ... nodesToCleanup ] . reverse ( ) ) {
408408 await deleteBaseNode ( baseId , nodeId ) ;
409409 }
410410 nodesToCleanup . length = 0 ;
@@ -686,7 +686,7 @@ describe('BaseNodeController (e2e) /api/base/:baseId/node', () => {
686686 const nodesToCleanup : string [ ] = [ ] ;
687687
688688 afterEach ( async ( ) => {
689- for ( const nodeId of nodesToCleanup ) {
689+ for ( const nodeId of [ ... nodesToCleanup ] . reverse ( ) ) {
690690 await deleteBaseNode ( baseId , nodeId ) ;
691691 }
692692 nodesToCleanup . length = 0 ;
@@ -756,7 +756,7 @@ describe('BaseNodeController (e2e) /api/base/:baseId/node', () => {
756756 const nodesToCleanup : string [ ] = [ ] ;
757757
758758 afterEach ( async ( ) => {
759- for ( const nodeId of nodesToCleanup ) {
759+ for ( const nodeId of [ ... nodesToCleanup ] . reverse ( ) ) {
760760 await deleteBaseNode ( baseId , nodeId ) ;
761761 }
762762 nodesToCleanup . length = 0 ;
@@ -1127,12 +1127,8 @@ describe('BaseNodeController (e2e) /api/base/:baseId/node', () => {
11271127
11281128 afterAll ( async ( ) => {
11291129 // Cleanup nodes first
1130- for ( const nodeId of nodesToCleanup ) {
1131- try {
1132- await deleteBaseNode ( permissionBaseId , nodeId ) ;
1133- } catch ( e ) {
1134- // Ignore cleanup errors
1135- }
1130+ for ( const nodeId of [ ...nodesToCleanup ] . reverse ( ) ) {
1131+ await deleteBaseNode ( permissionBaseId , nodeId ) ;
11361132 }
11371133 // Then delete the space (which will delete the base)
11381134 await apiPermanentDeleteSpace ( permissionSpaceId ) ;
@@ -1339,7 +1335,7 @@ describe('BaseNodeController (e2e) /api/base/:baseId/node', () => {
13391335 const creatorNodesToCleanup : string [ ] = [ ] ;
13401336
13411337 afterEach ( async ( ) => {
1342- for ( const nodeId of creatorNodesToCleanup ) {
1338+ for ( const nodeId of [ ... creatorNodesToCleanup ] . reverse ( ) ) {
13431339 await deleteBaseNode ( permissionBaseId , nodeId ) ;
13441340 }
13451341 creatorNodesToCleanup . length = 0 ;
0 commit comments