Skip to content
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

Server-side coverage is not tracked #3

Open
romandecker opened this issue Apr 27, 2022 · 5 comments
Open

Server-side coverage is not tracked #3

romandecker opened this issue Apr 27, 2022 · 5 comments

Comments

@romandecker
Copy link

Hey!

Thanks for putting this together, I was able to adopt it for my project ❤️

However, I found that some files don't seem to be tracked, specifically anything that runs server-side. In my project, I have middlewares, api routes, getServerSideProps, etc... and all of that is not being tracked.

I've put together a minimum example with a single getServerSideProps call.

I made sure to explicitly include the file I want to cover in the .nycrc.json file, however, code in no-coverage-here is not being tracked as you can see:

image

An interesting side note seems to be, that there invocation of foo() seems to be tracked correctly, it's really just the file inside no-coverage-here that's missing.
image

Any idea what could be going wrong here?

@kylemh
Copy link
Owner

kylemh commented Apr 27, 2022

No idea here! 😞

I looked for a relevant issue in https://github.com/cypress-io/code-coverage but didn't see any. It's possible this could be a mistake from Cypress's code-coverage module, from Istanbul, or from some aspect of the config written here.

If you find the answer, let's definitely fix it here.

@romandecker
Copy link
Author

I'll report it with them.

@kylemh
Copy link
Owner

kylemh commented Apr 27, 2022

The problem could be here, to be clear. I just don't see where.

@cri-us
Copy link

cri-us commented Jun 27, 2022

Same issue, any update about solution ?

@kylemh
Copy link
Owner

kylemh commented Jun 28, 2022

@bahmutov let me know if you have any ideas that I can act on - even if it's just high level thoughts. Would love to keep this repo working well and I can do a Cypress v10 update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants