Commit b916517
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 2eaba45 commit b916517
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