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

visgl / loaders.gl / 24153816851

08 Apr 2026 07:17PM UTC coverage: 53.247% (-12.1%) from 65.319%
24153816851

push

github

web-flow
chore: Move from tape to vitest (#3351)

8651 of 17291 branches covered (50.03%)

Branch coverage included in aggregate %.

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

2031 existing lines in 296 files now uncovered.

17563 of 31940 relevant lines covered (54.99%)

5279.54 hits per line

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

68.42
/modules/loader-utils/src/lib/worker-loader-utils/encode-with-worker.ts
1
import {WorkerFarm} from '@loaders.gl/worker-utils';
2
import {Writer, WriterOptions} from '../../writer-types';
3
import {isBrowser} from '../env-utils/globals';
4

5
/**
6
 * Determines if a loader can parse with worker
7
 * @param loader
8
 * @param options
9
 */
10
export function canEncodeWithWorker(writer: Writer, options?: WriterOptions) {
11
  if (!WorkerFarm.isSupported()) {
14!
12
    return false;
×
13
  }
14

15
  const nodeWorkers = options?._nodeWorkers ?? options?.core?._nodeWorkers;
14✔
16
  const useWorkers = options?.worker ?? options?.core?.worker;
14✔
17

18
  // Node workers are still experimental
19
  if (!isBrowser && !nodeWorkers) {
14!
UNCOV
20
    return false;
×
21
  }
22

23
  return Boolean(writer.worker && useWorkers);
14!
24
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc