Coverage does not get properly reported [NodeJS, Typescript, Jest]

Must-share information (formatted with Markdown):

Hi there, I used sonar through sonarcloud to put quality gates in place but sometimes the coverage comes out wrong.
I used this configuration for coverage path:
which looks like the correct path. However sonar tells me some new lines are not covered by tests while jest returns a 100% coverage on all the categories.

Do you have any idea what I might be doing wrong ? :confused:


Please provide full debug logs, your report, and provide examples of inconsistencies in coverage (file, line).

Hm, I just noticed that you used javascript tag but Typescript in title. Which language are you using at the end?
For TypeScript you need to use another property, sonar.typescript.lcov.reportPaths

Hello Elena, Thank you for your prompt reply !

Indeed it seems to fix my issue, thanks :slight_smile: If I have a composite project using javascript and Typescript (we are migrating to TS). Is using sonar.typescript.lcov.reportPaths instead sonar.javascript.lcov.reportPaths going to show only ts coverage or also the js part that is covered ? Should I use both ?

— Edit —
I just checked, it looks like it takes js into account.

Thanks you for your help Elena everything looks fine now :slight_smile: