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

websockets / ws / 2473 / 14
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: 8.18.3
DEFAULT BRANCH: master
Ran 14 Jan 2021 03:53AM UTC
Files 13
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Jan 2021 03:53AM UTC coverage: 99.589% (-0.3%) from 99.918%
2473.14

Pull #1834

travis-ci-com

GitHub
Fixed code issue in docs for broadcasting 

in the example 

```js
const WebSocket = require('ws');

const wss = new WebSocket.Server({ port: 8080 });

wss.on('connection', function connection(ws) {
  ws.on('message', function incoming(data) {
    wss.clients.forEach(function each(client) {
      if (client !== ws && client.readyState === WebSocket.OPEN) {
        client.send(data);
      }
    });
  });
});
```

`ws` is not defined and throws an error. It should be `wss`. Just had this error myself and contribute to fix the docs.
Pull Request #1834: Fixed code issue in docs for broadcasting

802 of 813 branches covered (98.65%)

1211 of 1216 relevant lines covered (99.59%)

987.09 hits per line

Source Files on job 2473.14
  • Tree
  • List 0
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 18209587
  • Travis Job 2473.14
  • 05f08983 on github
  • Prev Job for on patch-1 (#2471.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

© 2025 Coveralls, Inc