• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / realtime-js / 15193083446

22 May 2025 05:32PM UTC coverage: 89.738% (-5.8%) from 95.568%
15193083446

push

github

web-flow
fix: properly handle ws browser export (#474)

361 of 408 branches covered (88.48%)

Branch coverage included in aggregate %.

11 of 23 new or added lines in 5 files covered. (47.83%)

1318 of 1463 relevant lines covered (90.09%)

51.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/WebSocket.ts
1
// Node.js WebSocket entry point
2

3
let WebSocketImpl: any
1✔
4

5
if (typeof window === 'undefined') {
1!
6
  // Node.js environment
7
  // eslint-disable-next-line @typescript-eslint/no-var-requires
NEW
8
  WebSocketImpl = require('ws')
×
9
} else {
1✔
10
  // Browser environment
11
  WebSocketImpl = window.WebSocket
1✔
12
}
1✔
13

14
export default WebSocketImpl
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc