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

Add line-level source map support #308

Closed
Pablissimo opened this Issue Dec 27, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@Pablissimo
Contributor

Pablissimo commented Dec 27, 2014

Chutzpah is currently able to identify a generated source file from its original source, but not to map between the two files line-by-line.

This means that for situations where a language is compiling down to JavaScript, like with Typescript, Chutzpah can't output accurate code coverage information:

  • Code coverage percentages may be inaccurate as they relate to the number of uncovered vs covered lines in the generated, rather than original source
  • Code coverage breakdowns (via the context menu extension) show the correct original source filenames, but expand to generated source

Obviously this is pretty minor, but it's something I may need for integration with Sonarqube so I'm opening this to have something to submit against!

@Pablissimo

This comment has been minimized.

Show comment
Hide comment
@Pablissimo

Pablissimo Dec 29, 2014

Contributor

A very quick spike shows it's possible for TypeScript at least:
very quick spike

Works via a library I threw together to parse source maps. Only does line-level coverage though - testing minified files would still trip everything up.

Contributor

Pablissimo commented Dec 29, 2014

A very quick spike shows it's possible for TypeScript at least:
very quick spike

Works via a library I threw together to parse source maps. Only does line-level coverage though - testing minified files would still trip everything up.

@mmanela

This comment has been minimized.

Show comment
Hide comment
@mmanela

mmanela Dec 30, 2014

Owner

That is awesome. I agree this is a minor issue but it would really tie together the code coverage functionality for coffeescript/typescript

Owner

mmanela commented Dec 30, 2014

That is awesome. I agree this is a minor issue but it would really tie together the code coverage functionality for coffeescript/typescript

@Pablissimo

This comment has been minimized.

Show comment
Hide comment
@Pablissimo

Pablissimo Jan 3, 2015

Contributor

I've tidied up my spike with what will hopefully become a PR at some point but will run it against a 'proper' TypeScript application once I'm back in work before doing so to make sure it'll minimally do what I need it to! However, it's there for review or playing about with should anyone be interested.

Contributor

Pablissimo commented Jan 3, 2015

I've tidied up my spike with what will hopefully become a PR at some point but will run it against a 'proper' TypeScript application once I'm back in work before doing so to make sure it'll minimally do what I need it to! However, it's there for review or playing about with should anyone be interested.

@Pablissimo

This comment has been minimized.

Show comment
Hide comment
@Pablissimo

Pablissimo Jan 17, 2015

Contributor

PR created: #316

Contributor

Pablissimo commented Jan 17, 2015

PR created: #316

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