-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Incorrect coverage report in 13.x and 14.x #1097
Comments
Can you provide a link to your repo or a minimal reproduction? Also can you follow the instructions here: https://npm.im/@istanbuljs/nyc-config-typescript and see if that fixes your issue? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thank you for the really quick replay! I already tried I already tried to revert to 13.* but the issue still occurs in my project. Unfortunately, I can't reproduce this issue in a new demo project. |
I have several examples of PRs I've made that simplify the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@maleeb thanks for testing / responding. The original poster of this issue has stated that downgrading to 13.x did not fix the issue, so all problems caused by upgrade to 14.x are off topic on this ticket. @Codex- please follow the suggestion from @maleeb (click Show Comment to see it). All comments not related to OP's issue are hidden as off topic so it's easier to find information relevant to this specific issue. Unless your issue can be reproduced on 13.x or you have advice for that specific issue please do not post any further comments to this ticket, please open a new ticket instead. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The latest version 15.0.0 has this issue. Downgrading back to 14.1.1 works fine. |
What's your config? Probably need to raise a new issue |
I try to get the test coverage from a more or less large Typescript project by using nyc. Nearly all my TypeScript files will have their own test files with many test cases.
In my option all this files should be covered by nyc. I try a lot with different nyc configurations and different versions of how to execute the test files.
At the beginning I start with a configuration where single files (which actually should have tests) will not appear in the coverage report. I could fix this issue by requiring "ts-node/register" and "source-map-support/register" to the nyc configuration. Now all files are listed in the coverage report but nyc think that there are no fitting tests.
I do not have any idea why this tests should not be covered. I try to reproduce it in a new bug-demo project but their, everything works well.
Troubleshooting steps
cache: false
in my nyc configsourceMap: true
makes no differenceexclude
withoutinclude
in my nyc configa "Cannot read property 'loc' of undefined" exception, see screenshot-2)
Environment Information
NYC Configuration
screenshot-2
The text was updated successfully, but these errors were encountered: