mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-16 20:21:54 +00:00
Merge pull request #15584 from overleaf/jpa-websocket-state-enum
[web] tests: provide enums for WebSocket states GitOrigin-RevId: 94e7c0510c325880f54a277fcd3509538df70a22
This commit is contained in:
parent
dbf8e6c6ef
commit
ebe9032621
1 changed files with 8 additions and 0 deletions
8
services/web/test/frontend/bootstrap.js
vendored
8
services/web/test/frontend/bootstrap.js
vendored
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue