Skip to content

Commit 88bdbad

Browse files
jumyhreCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent a68194a commit 88bdbad

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

packages/dds/tree/src/test/shared-tree/editing.spec.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)