• 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

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

1✔
5
import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';
1✔
6
import type {ParseXMLOptions} from './lib/parsers/parse-xml';
1✔
7
import {parseXMLSync} from './lib/parsers/parse-xml';
1✔
8

1✔
UNCOV
9
// __VERSION__ is injected by babel-plugin-version-inline
×
10
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
1✔
11
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
1!
12

1✔
13
export type XMLLoaderOptions = LoaderOptions & {
1✔
14
  xml?: ParseXMLOptions;
1✔
15
};
1✔
16

1✔
17
/**
1✔
18
 * Loader for XML files
1✔
19
 */
1✔
20
export const XMLLoader = {
1✔
21
  dataType: null as any,
1✔
22
  batchType: null as never,
1✔
23
  name: 'XML',
1✔
24
  id: 'xml',
1✔
25
  module: 'xml',
1✔
26
  version: VERSION,
1✔
27
  worker: false,
1✔
28
  extensions: ['xml'],
1✔
29
  mimeTypes: ['application/xml', 'text/xml'],
1✔
UNCOV
30
  testText: testXMLFile,
×
UNCOV
31
  options: {
×
UNCOV
32
    xml: {
×
UNCOV
33
      _parser: 'fast-xml-parser',
×
34
      uncapitalizeKeys: false,
1✔
35
      removeNSPrefix: false,
1✔
36
      textNodeName: 'value',
39✔
37
      arrayPaths: []
39✔
38
    }
1✔
UNCOV
39
  },
×
UNCOV
40
  parse: async (arrayBuffer: ArrayBuffer, options?: XMLLoaderOptions) =>
×
41
    parseXMLSync(new TextDecoder().decode(arrayBuffer), {
×
42
      ...XMLLoader.options.xml,
×
43
      ...options?.xml
×
44
    }),
1✔
45
  parseTextSync: (text: string, options?: XMLLoaderOptions) =>
1✔
46
    parseXMLSync(text, {...XMLLoader.options.xml, ...options?.xml})
39✔
47
} as const satisfies LoaderWithParser<any, never, XMLLoaderOptions>;
1✔
48

1✔
49
function testXMLFile(text: string): boolean {
×
50
  // TODO - There could be space first.
×
51
  return text.startsWith('<?xml');
×
52
}
×
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