Buidler Plugin & Coverage API
Pre-releaseHi!
Phase II of solidity-coverage's redesign is complete with this release. A long-standing goal here has been to make the tool more 'library-like' and decouple from any single development platform. beta.3
moves in that direction by:
- Publishing an API
- Using the API to create a coverage plugin for the Buidler development platform.
Buidler Plugin 👷♀
Buidler is a beautifully written, ultra-fast Ethereum task/test runner. There's also some really interesting work going on over there to develop an alternative JS Ethereum client with Solidity stack traces which is well worth checking out.
To use solidity-coverage with Buidler, install as usual and list it as a plugin in your buidler.config.js
usePlugin('solidity-coverage')
module.exports = {
networks: {...},
}
Run the 'coverage' task:
npx buidler coverage
Coverage API 🐘
If you're interested in writing your own coverage plugin or have a custom testing setup, you might find the new API useful. You can now access most of this repo's internals by writing:
const CoverageAPI = require('solidity-coverage/api');
const utils = require('solidity-coverage/utils');
Full API documentation is available here