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

websockets / ws / 2473
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: 8.19.0
DEFAULT BRANCH: master
Ran 14 Jan 2021 03:53AM UTC
Jobs 10
Files 13
Run time 39s
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

pending completion
2473

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

804 of 813 branches covered (98.89%)

1215 of 1216 relevant lines covered (99.92%)

11109.68 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2473.1 14 Jan 2021 03:53AM UTC 0
99.92
Travis Job 2473.1
2 2473.2 14 Jan 2021 03:53AM UTC 0
99.92
Travis Job 2473.2
3 2473.3 14 Jan 2021 03:53AM UTC 0
99.92
Travis Job 2473.3
4 2473.4 14 Jan 2021 03:53AM UTC 0
99.84
Travis Job 2473.4
5 2473.5 14 Jan 2021 03:53AM UTC 0
99.92
Travis Job 2473.5
11 2473.11 14 Jan 2021 03:53AM UTC 0
99.67
Travis Job 2473.11
12 2473.12 14 Jan 2021 03:53AM UTC 0
99.67
Travis Job 2473.12
13 2473.13 14 Jan 2021 03:53AM UTC 0
99.67
Travis Job 2473.13
14 2473.14 14 Jan 2021 03:53AM UTC 0
99.59
Travis Job 2473.14
15 2473.15 14 Jan 2021 03:53AM UTC 0
99.67
Travis Job 2473.15
Source Files on build 2473
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #2473
  • Pull Request #1834
  • PR Base - master (#2471)
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