yearn / yearn-vaults-v2-subgraph

26 stars 41 forks source link

Refactor Testing #162

Closed bsamuels453 closed 2 years ago

bsamuels453 commented 2 years ago

This PR changes how tests are run against the subgraph. https://github.com/bsamuels453/yearn-vaults-v2-subgraph/blob/feature/refactor-tests/tests/README.md

Instead of generating static chain state fixtures, this test suite implements stubs/mocks that can eliminate the need for fixtures. This should make tests much easier to write.

This PR also adds coverage support. Coverage can be checked using yarn coverage

This PR also includes 0xkoffee's field additions & some oracle price fixes which are summarized in the changelog here: https://github.com/yearn/yearn-vaults-v2-subgraph/pull/162/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed

This PR also includes a contribution from Alex removing the balanceTokensInvested field since it was not populated and there's no good way to populate the value

bsamuels453 commented 2 years ago

https://thegraph.com/hosted-service/subgraph/0xkofee/yearn-vaults-v2?selected=logs