Closed ghardin1314 closed 2 years ago
Check the instructions on how to use it https://github.com/LimeChain/demo-subgraph#test-coverage-linux-and-macos
If that does not work, could you send me a screenshot of your test file or a link to the repo?
Could you try deleting node_modules
and package-lock.json
, then run npm install
again.
Followed the instructions with a fresh install and still getting the same error. Here is one of our test files located at ./tests/subgraph/GnosisSafeL2.test.ts
https://gist.github.com/ghardin1314/3b01adf26361ff21c674e786d221f37f
--Edit-- I think I managed to reproduce it, will look into it.
So, currently there is a small limitation, in order for the coverage to work, your test suite name should match the mapping file name for the specific datasource, for example in the demo-subgraph, the mappings file name is gravity.ts, and the tests are located in './tests/gravity', which creates a test suite named gravity
.
Ah, so because our files are named
Does folder structure also matter? Until #275 is closed we have to use one test suite called subgraph
to separate our mapping tests from our contracts tests
Could you try running the coverage with version 0.2.4-alpha
and tell me if it works?
The coverage flag update in 0.2.3 does not seem to be working. I get the following error when using
-c
This is the same if I try to run naively on Linux or in a dockerfile similar to the
subgraph-demo
setupconfig: