Commit 4acec81
committed
frontend: multiplexer: Cancel pending timers in test teardown
The afterEach in multiplexer.test.ts called
pendingUnsubscribes.clear() without cancelling the stored timeouts.
This left orphaned setTimeout callbacks that could fire after vitest
tore down the jsdom environment, causing a sporadic
"ReferenceError: WebSocket is not defined".
Call forEach(clearTimeout) before clear() so all pending debounce
timers are cancelled before the test environment is destroyed.1 parent 2f447d3 commit 4acec81
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
0 commit comments