diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index 487601e2..faf42aff 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -152,7 +152,9 @@ export const testRejectUpdateExample = _tc => { try { Y.applyUpdate(ydoc, update, 'remote change') } finally { - um.undo() + while (um.undoStack.length) { + um.undo() + } um.destroy() ydoc.store.pendingDs = beforePendingDs ydoc.store.pendingStructs = null