Closed hanspagel closed 3 years ago
Oops, duplicate of #51.
Thanks a bunch for working on lib0. But there's still a window reference in y-websocket itself: https://github.com/yjs/y-websocket/blob/9d7e5eaec89050a191b301c45e484357f1c44ae8/src/y-websocket.js#L279
Describe the bug I’m trying to use y-websocket in Node.js (for testing purposes). As described in the README I’m passing
ws
as a WebsocketPolyfill, like this:When I try to run this code there are two parts that expect to run in a Browser context:
To Reproduce
Expected behavior I’d expect y-websocket to use
window
only when available.Environment Information
Additional context I don’t know if it’s dumb using y-websocket in Node.js, but using Cypress feels like overkill. ¯\_(ツ)_/¯