Skip to content

coverageRanges without using the filesystem #196

Description

@FranckFreiburger

Description

According to the types definition file :

/** Represents single bundle */
export interface Bundle {
code: File;
map?: File;
coverageRanges?: ColumnsRange[][];
}

Bundle accepts code, map and coverageRanges.
But it seems to not being taken in account in the output html file.

Steps to reproduce

        // page is a puppeteer page object
	const coverageData = await page.coverage.stopJSCoverage();
	const bundle = {
		code: await fetch('http://127.0.0.1:8182/vue3-sfc-loader.js').then(res => res.buffer()),
		map: await fetch('http://127.0.0.1:8182/vue3-sfc-loader.js.map').then(res => res.buffer()),
		coverageRanges: coverageData.find(e => e.url === 'http://127.0.0.1:8182/vue3-sfc-loader.js').ranges;
	}
	const result = await explore(bundle, {
		output: { format: 'html' },
	});
	fs.writeFileSync('exploreOutput.html', result.output);

Expected behavior
coverage information to be included in exploreOutput.html

Environment

  • OS: win7
  • source-map-explorer Version 2.5.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions