diff --git a/services/web/test/frontend/bootstrap.js b/services/web/test/frontend/bootstrap.js index b871ce86a2..be859893cb 100644 --- a/services/web/test/frontend/bootstrap.js +++ b/services/web/test/frontend/bootstrap.js @@ -112,6 +112,14 @@ globalThis.BroadcastChannel = postMessage(message) {} } +// add stub for WebSocket state enum +globalThis.WebSocket = class WebSocket { + static CONNECTING = 0 + static OPEN = 1 + static CLOSING = 2 + static CLOSED = 3 +} + // node-fetch doesn't accept relative URL's: https://github.com/node-fetch/node-fetch/blob/master/docs/v2-LIMITS.md#known-differences const fetch = require('node-fetch') globalThis.fetch =