test(setup): stub websocket addListener/removeListener in the global mock

BackgroundTasksWidget (mounted globally in App) subscribes via addListener/removeListener from api/websocket, but the global test mock didn't export them, so every test that renders <App/> threw on mount. Add the two stubs. (Surfaced now that the page-pattern check passes and the client test step actually runs.)
This commit is contained in:
Maurice
2026-06-26 22:25:02 +02:00
committed by Maurice
parent c3b3c278b8
commit f206fa6dff
+2
View File
@@ -11,6 +11,8 @@ vi.mock('../src/api/websocket', () => ({
getSocketId: vi.fn(() => null), getSocketId: vi.fn(() => null),
setRefetchCallback: vi.fn(), setRefetchCallback: vi.fn(),
setPreReconnectHook: vi.fn(), setPreReconnectHook: vi.fn(),
addListener: vi.fn(),
removeListener: vi.fn(),
})); }));
// MSW lifecycle // MSW lifecycle