mirror of
https://github.com/TriliumNext/Trilium.git
synced 2026-10-12 02:09:59 +00:00
@codemirror/view 6.43.14 makes DOMObserver.flush() call view.update([]) whenever it saw a selection change. happy-dom dispatches selectionchange synchronously from inside Selection.collapse(), which CodeMirror calls while writing its selection during an update, so all ten hosted_completion specs threw "Calls to EditorView.update are not allowed while an update is in progress". The package had no test setup, so it did not get the deferral added to apps/client/src/test/setup.ts. Add the same setup here, kept out of the library build and the coverage count. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UQQd11a32NYctkABZQY3dM