File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
packages/dds/tree/src/test/shared-tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3467,9 +3467,12 @@ describe("Editing", () => {
34673467 branch . editor . sequenceField ( rootField ) . insert ( 1 , chunkFromJsonTrees ( [ "W" ] ) ) ;
34683468 branch . transaction . commit ( ) ;
34693469
3470- undoStack . pop ( ) ?. revert ( ) ;
3471- undoStack . pop ( ) ?. revert ( ) ;
3472- undoStack . pop ( ) ?. revert ( ) ;
3470+ const undo1 = undoStack . pop ( ) ?? assert . fail ( "Missing undo" ) ;
3471+ undo1 . revert ( ) ;
3472+ const undo2 = undoStack . pop ( ) ?? assert . fail ( "Missing undo" ) ;
3473+ undo2 . revert ( ) ;
3474+ const undo3 = undoStack . pop ( ) ?? assert . fail ( "Missing undo" ) ;
3475+ undo3 . revert ( ) ;
34733476
34743477 expectJsonTree ( branch , [ "A" , "X" , "B" ] ) ;
34753478 unsubscribe ( ) ;
@@ -3515,8 +3518,10 @@ describe("Editing", () => {
35153518 ) ;
35163519 branch . transaction . commit ( ) ;
35173520
3518- undoStack . pop ( ) ?. revert ( ) ;
3519- undoStack . pop ( ) ?. revert ( ) ;
3521+ const undo1 = undoStack . pop ( ) ?? assert . fail ( "Missing undo" ) ;
3522+ undo1 . revert ( ) ;
3523+ const undo2 = undoStack . pop ( ) ?? assert . fail ( "Missing undo" ) ;
3524+ undo2 . revert ( ) ;
35203525
35213526 expectJsonTree ( branch , [ { "X" : 1 , "B" : 2 , "C" : 3 } ] ) ;
35223527 unsubscribe ( ) ;
You can’t perform that action at this time.
0 commit comments