Commit 25c2604
test(core): destroy editors in IndexingPlugin.test afterEach
The tests created BlockNoteEditor instances via createEditor() but never
destroyed them. prosemirror-view's DOMObserver keeps a setTimeout alive
waiting to flush pending mutations; when vitest tears down jsdom between
test files the timer fires against a torn-down document and throws
`ReferenceError: document is not defined`. Vitest catches it as an
unhandled error and fails the whole run even when all 16 assertions pass.
Local runs usually hit the lucky teardown ordering and pass; CI surfaces
the race intermittently. Tracking created editors and calling
_tiptapEditor.destroy() in afterEach ensures the DOMObserver timers are
canceled before jsdom goes away.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent aefa9d2 commit 25c2604
1 file changed
Lines changed: 14 additions & 1 deletion
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
12 | 24 | | |
13 | 25 | | |
14 | 26 | | |
| 27 | + | |
15 | 28 | | |
16 | 29 | | |
17 | 30 | | |
| |||
0 commit comments