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

streetsidesoftware / regexp-worker / 15700042617

17 Jun 2025 06:38AM UTC coverage: 95.301% (-2.4%) from 97.665%
15700042617

Pull #961

github

web-flow
Merge 4bfe7ca6f into e81b036c3
Pull Request #961: fix: drop hrtime dependency

139 of 154 branches covered (90.26%)

Branch coverage included in aggregate %.

28 of 34 new or added lines in 6 files covered. (82.35%)

3 existing lines in 1 file now uncovered.

368 of 378 relevant lines covered (97.35%)

158.52 hits per line

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

60.0
/src/worker/workerThread.ts
1
import { parentPort, isMainThread, Worker } from 'worker_threads';
2
import { createHandler } from './WorkerMessageHandler.js';
3
import { toOutDir } from '../util/toOutDir.js';
4
import { fileURLToPath } from 'url';
5

6
export type { Worker } from 'worker_threads';
7

8
const __filename = fileURLToPath(import.meta.url);
3✔
9

10
let defaultFilename = __filename;
3✔
11

12
// If this isn't the .js file, then we need to point to the .js file.
13
// This can happen when running jest with ts-loader.
14
if (!defaultFilename.match(/\.js$/)) {
3!
UNCOV
15
    defaultFilename = toOutDir(__filename).replace(/ts$/, 'js');
×
16
}
17

18
export function createWorker(filename: string = defaultFilename): Worker {
23✔
19
    return new Worker(filename);
23✔
20
}
21

22
if (!isMainThread && parentPort) {
3!
UNCOV
23
    const handler = createHandler(parentPort);
×
UNCOV
24
    parentPort.once('close', handler.dispose);
×
25
}
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