How to use the istanbul-lib-coverage.CoverageMap function in istanbul-lib-coverage

To help you get started, we’ve selected a few istanbul-lib-coverage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / istanbul-lib-source-maps / istanbul-lib-source-maps-tests.ts View on Github external

const sourceMap: RawSourceMap = {
	version: 1 as any as string, // Fixed by but the fix is not yet published
	sources: ['foo', 'bar'],
	names: ['foo', 'bar'],
	mappings: 'foo',
	file: 'foo'
store.registerMap('foo', sourceMap);

store.registerURL('foo', 'foo');

const map = new CoverageMap({});
const transformed = store.transformCoverage(map);;


store.sourceStore.registerSource('foo', 'bar');
const source = store.sourceStore.getSource('foo');
if (source != null) {