Ts-jest: Line numbers in coverage wrong with coverageprocessor

Created on 28 Nov 2016  路  3Comments  路  Source: kulshekhar/ts-jest

I have a repo with my test mule project here: https://github.com/japhar81/redux_template

clone, npm run test and open coverage/index.html. It shows the issue pretty clearly;
image

Most helpful comment

@Igmat I did -- here's what I found to work (in case anyone stumbles on this);

  1. tsconfig.json should target ES6
  2. tsconfig.json should set inlineSourceMap to true
  3. Install/configure ts-jest per readme

With those in place I seem to get proper percentages (but not line numbers) in the text summary that's printed, and proper line numbers in the re-mapped output.

All 3 comments

Sorry just realized the remapped coverage is in a separate directory. So that works -- however the text summary does not -- is that intentional?

@japhar81 do you mean summary in console? If yes, unfortunately we can't affect it as for now...

@Igmat I did -- here's what I found to work (in case anyone stumbles on this);

  1. tsconfig.json should target ES6
  2. tsconfig.json should set inlineSourceMap to true
  3. Install/configure ts-jest per readme

With those in place I seem to get proper percentages (but not line numbers) in the text summary that's printed, and proper line numbers in the re-mapped output.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stephenotalora picture stephenotalora  路  3Comments

Slessi picture Slessi  路  3Comments

bruk1977 picture bruk1977  路  3Comments

jbreckmckye picture jbreckmckye  路  3Comments

Vinnl picture Vinnl  路  3Comments