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

supabase / realtime-js / 15167131467

21 May 2025 04:07PM UTC coverage: 95.42% (-0.1%) from 95.568%
15167131467

Pull #474

github

web-flow
Merge 1e1cf5490 into 5db9d37d3
Pull Request #474: fix: properly handle ws browser export

656 of 707 branches covered (92.79%)

Branch coverage included in aggregate %.

11 of 16 new or added lines in 2 files covered. (68.75%)

3511 of 3660 relevant lines covered (95.93%)

21.93 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