Add line-level source map support #308

Pablissimo opened this Issue Dec 27, 2014 · 4 comments


None yet

2 participants


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!


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 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


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.


PR created: #316

@mmanela mmanela closed this in 3720039 Jan 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment