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

visgl / loaders.gl / 24139120841

08 Apr 2026 01:53PM UTC coverage: 65.319% (+30.2%) from 35.137%
24139120841

push

github

web-flow
chore: Replace puppeteer with playwright (#3350)

14216 of 18890 branches covered (75.26%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

3248 existing lines in 369 files now uncovered.

73509 of 115413 relevant lines covered (63.69%)

5763.45 hits per line

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

5.88
/modules/worker-utils/src/lib/process-utils/process-utils.ts
1
// loaders.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
UNCOV
3
// Copyright (c) vis.gl contributors
×
UNCOV
4

×
UNCOV
5
import ChildProcess from 'child_process';
×
UNCOV
6

×
UNCOV
7
// Get an available port
×
UNCOV
8
// Works on Unix systems
×
UNCOV
9
export function getAvailablePort(defaultPort: number = 3000): Promise<number> {
×
10
  return new Promise(resolve => {
×
11
    // Get a list of all ports in use
×
12
    ChildProcess.exec('lsof -i -P -n | grep LISTEN', (error, stdout) => {
×
13
      if (error) {
×
14
        // likely no permission, e.g. CI
×
15
        resolve(defaultPort);
×
16
        return;
×
17
      }
×
18

×
19
      const portsInUse: number[] = [];
×
20
      const regex = /:(\d+) \(LISTEN\)/;
×
21
      stdout.split('\n').forEach(line => {
×
22
        const match = regex.exec(line);
×
23
        if (match) {
×
24
          portsInUse.push(Number(match[1]));
×
25
        }
×
26
      });
×
27
      let port = defaultPort;
×
28
      while (portsInUse.includes(port)) {
×
29
        port++;
×
30
      }
×
31
      resolve(port);
×
32
    });
×
33
  });
×
34
}
×
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