hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

Support code coverage in v3

Open kanej opened this issue 1 year ago • 1 comments

Expand the JS/TS integration testing with explicit support for code coverage.

This will require injecting slang into the testing pipeline to parse and modify the Solidity code under test to include coverage instrumentation.

An initial design doc, that should be refined is available here: https://www.notion.so/nomicfoundation/Code-Coverage-in-Hardhat-3-1cf578cdeaf580a4b640f394cb70da40

TODO

  • [x] Update the build pipeline to run instrumentation
  • [x] Update EDR instantiation to pass appropriate config + metadata
  • [x] Collecting, computing and merging coverage from multiple EDR providers
  • [x] lcov file generation
  • [x] Integration of reporting into Node Test Runner
  • [x] Integration of reporting into Mocha
  • [ ] Integration of reporting into Solidity test

kanej avatar Aug 15 '24 15:08 kanej

#6637 Pls check this implementation. See if its anything worthwhile. Thanks

demoncoder-crypto avatar Apr 26 '25 20:04 demoncoder-crypto