MishaKav / jest-coverage-comment

Comments a pull request or commit with the jest code coverage badge, full report and tests summary
MIT License
80 stars 34 forks source link

The link of missing line doesn't work properly with Jest option --changedSince #89

Open vhoang1102 opened 4 months ago

vhoang1102 commented 4 months ago

Hi, hope you're doing well! I'm using your action and it works perfectly. But I have around 10k unit tests so I just want to run some of them that relate to changed file in the PR. So I use the jest option --changedSince=origin/master in the running command. Then when I click on the link of missing line, it seems to be lacking of coveragePathPrefix. This is an example link: https://git.abc.net/xyz/mno/blob/a1a3c28b2b5642925e6f201ecac5489341408e0b/responses.ts#L33 and it shows 404 not found.

Please note it works well if I don't use the option --changedSince=origin/master. Could you please help? Did I miss any configuration? I did try adding coverage-path-prefix: src/ but it doesn't help, it just includes /src to the link but my file is located at src/clients/abc/responses.ts

MishaKav commented 4 months ago

I will try to reproduce your case with --changedSince=origin/master and let you know.

vhoang1102 commented 4 months ago

Beside of that, if I use the Jest option --findRelatedTests or --changedSince, jest coverage report All File (in the attached picture) seems to be un-helpful, can we have an option to disable it in the report.

Screenshot 2024-06-10 at 10 56 12