Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakdown report based on sourcemap #193

Closed
Izhaki opened this issue Nov 10, 2015 · 6 comments
Closed

Breakdown report based on sourcemap #193

Izhaki opened this issue Nov 10, 2015 · 6 comments

Comments

@Izhaki
Copy link

Izhaki commented Nov 10, 2015

There seem to be a few related issues (#146, #109), but still unsure about the actual answer.

We have two projects:

  • One uses coffeescript and browserify
  • The other typescript and grunt-ts

In both project source files (*.coffee \ *.ts) are converted into a single .js file and a source map is created.

Is it possible for the generated report to show a breakdown of the source files, rather than the single concated file?

@joerideg
Copy link

+1 , using systemjs-builder for example it would be nice to have the report on the source files and not the generated output.

I think the general problem is:
"'I somehow compiled and concatenated and minified all files and use sourcemaps. Now instead of trying to recreate this process via karma plugins so coverage makes sense I would like it if the report takes into account the sourcemaps that are generated"

Supporting sourcemaps would solve this kind of problems in a very generic way instead of trying to create seperate plugins like karma-systemjs or karma-jspm etc to recreate the building and concatenating of all source files.

@joerideg
Copy link

Any news on this?
I think it would be a major breakthrough honestly. It wouldnt matter any more what kinds of compiling / transforming a user does with their source code as long as they output a sourcemap. A user wouldnt have to basicly recreate their build process with all different karma plugins, they could simply include the output file they just created with their build process in the karma files array and still get coverage.

@nicole-ashley
Copy link

Any update on this? It would make it so much more flexible for users with different build systems. Re-creating the build in Karma is a hassle and also introduces the possibility of false negatives/positives if the build and the Karma configuration diverge.

@sinedied
Copy link

I tried karma-remap-istanbul which should this, but it would be nice if it was implemented directly in this plugin as there is lots of issue when making the two working.

Currently, I cannot run karma-coverage along karma-sourcemap-loader as preprocessors, as the coverage preprocessing either make the js file unusable or just breaks the sourcemaps.

@galtalmor
Copy link

I have also tried using karma-remap-istanbul in a TypeScript project, but couldn't make it work.
+1 for the request.

@Hoofoo-WHU
Copy link

It work use karma-coverage-istanbul-reporter replace karma-coverage in TypeScript project

@Izhaki Izhaki closed this as completed Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants