github
7348 of 9584 branches covered (76.67%)
Branch coverage included in aggregate %.
17 of 17 new or added lines in 1 file covered. (100.0%)
45 existing lines in 5 files now uncovered.73814 of 107350 relevant lines covered (68.76%)
7092.3 hits per line
1 |
// loaders.gl
|
1✔ |
2 |
// SPDX-License-Identifier: MIT
|
1✔ |
3 |
// Copyright (c) vis.gl contributors
|
1✔ |
4 |
|
1✔ |
5 |
// eslint-disable-next-line import/default
|
1✔ |
6 |
import initWasm from 'parquet-wasm'; |
1✔ |
7 |
import * as parquetWasm from 'parquet-wasm'; |
1✔ |
8 |
import {PARQUET_WASM_URL} from '../constants'; |
1✔ |
9 |
|
1✔ |
10 |
let initializePromise: any; |
1✔ |
11 |
|
1✔ |
12 |
export async function loadWasm(wasmUrl: string = PARQUET_WASM_URL) { |
1✔ |
UNCOV
13
|
if (!initializePromise && typeof initWasm === 'function') { |
× |
UNCOV
14
|
if (!wasmUrl) {
|
× |
UNCOV
15
|
throw new Error('ParquetLoader: No wasmUrl provided'); |
× |
UNCOV
16
|
} |
× |
UNCOV
17
|
// @ts-ignore
|
× |
UNCOV
18
|
initializePromise = initWasm(wasmUrl); |
× |
UNCOV
19
|
} |
× |
UNCOV
20
|
await initializePromise; |
× |
UNCOV
21
|
return parquetWasm;
|
× |
UNCOV
22
|
} |
× |