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

Inconsistent behaviour when using coverage feature. #424

Open
paro-paro opened this issue Mar 22, 2024 · 2 comments
Open

Inconsistent behaviour when using coverage feature. #424

paro-paro opened this issue Mar 22, 2024 · 2 comments

Comments

@paro-paro
Copy link

Hi,

I am facing some inconsistent behavior when using graph test --docker --coverage feature.

By inconsistent I mean that I am getting different results on different use cases and have not being able to debug it down to an specific case. As a result, the coverage command output will not properly (and consistently) report all the handlers that are being tested within test files.

Since this info is not quite helpful, here is a "minimal" reproduction showcasing my current use case (more details in the README) where two handlers are being tested from the same test file (properly exported) and the coverage output will only report one of them.

Environment:

  "dependencies": {
    "@graphprotocol/graph-cli": "^0.69.0",
    "@graphprotocol/graph-ts": "^0.34.0",
    "matchstick-as": "^0.6.0"
  }
  • macOS M2 pro

I am running graph test through docker (which is working perfectly fine) since the local os-m1-binary was not throwing any errors on failed tests (I believe this is a known issue, as stated in other issues and also the releases notes).

Any help will be appreciated (awesome tool btw)!

Thanks in advanced

@dimitrovmaksim
Copy link
Member

Hey @paro-paro, unfortunately coverage has always been finicky because of the WASM and the way we get is is somewhat hacky and so far we haven't found a more reliable way to get the coverage.

@paro-paro
Copy link
Author

Hi @dimitrovmaksim

Got it! Thanks a lot for the clarification.

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

2 participants