• 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

53.85
/modules/core/src/null-loader.ts
1
// loaders.gl
2
// SPDX-License-Identifier: MIT
3
// Copyright (c) vis.gl contributors
4

5
// __VERSION__ is injected by babel-plugin-version-inline
6
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
177!
8

9
import type {Loader, LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';
10
import {LoaderContext} from '@loaders.gl/loader-utils';
11

12
export type NullLoaderOptions = LoaderOptions & {
13
  null?: {};
14
};
15

16
/**
17
 * Loads any data and returns null (or optionally passes through data unparsed)
18
 */
19
export const NullWorkerLoader = {
177✔
20
  dataType: null,
21
  batchType: null as never,
22
  name: 'Null loader',
23
  id: 'null',
24
  module: 'core',
25
  version: VERSION,
26
  worker: true,
27
  mimeTypes: ['application/x.empty'],
28
  extensions: ['null'],
29
  tests: [() => false],
×
30
  options: {
31
    null: {}
32
  }
33
} as const satisfies Loader<null, never, NullLoaderOptions>;
34

35
/**
36
 * Loads any data and returns null (or optionally passes through data unparsed)
37
 */
38
export const NullLoader = {
177✔
39
  dataType: null,
40
  batchType: null,
41

42
  name: 'Null loader',
43
  id: 'null',
44
  module: 'core',
45
  version: VERSION,
46
  mimeTypes: ['application/x.empty'],
47
  extensions: ['null'],
48
  parse: async (
49
    arrayBuffer: ArrayBufferLike | ArrayBufferView,
50
    options?: NullLoaderOptions,
51
    context?: LoaderContext
UNCOV
52
  ) => parseSync(arrayBuffer, options || {}, context),
×
53
  parseSync,
54
  parseInBatches: async function* generator(asyncIterator, options, context) {
55
    for await (const batch of asyncIterator) {
3✔
56
      yield parseSync(batch, options, context);
4✔
57
    }
58
  },
UNCOV
59
  tests: [() => false],
×
60
  options: {
61
    null: {}
62
  }
63
} as const satisfies LoaderWithParser<null, null, NullLoaderOptions>;
64

65
/**
66
 * Returns arguments passed to the parse API in a format that can be transferred to a
67
 * web worker. The `context` parameter is stripped using JSON.stringify & parse.
68
 */
69
function parseSync(
70
  arrayBuffer: ArrayBufferLike | ArrayBufferView,
71
  options?: NullLoaderOptions,
72
  context?: LoaderContext
73
): null {
74
  return null;
4✔
75
}
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