|
|
|
@ -1,9 +1,9 @@ |
|
|
|
|
# solidity-coverage |
|
|
|
|
|
|
|
|
|
[![Gitter chat](https://badges.gitter.im/sc-forks/solidity-coverage.svg)][18] |
|
|
|
|
![npm (tag)](https://img.shields.io/npm/v/solidity-coverage/beta) |
|
|
|
|
![npm (tag)](https://img.shields.io/npm/v/solidity-coverage/master) |
|
|
|
|
[![CircleCI](https://circleci.com/gh/sc-forks/solidity-coverage.svg?style=svg)][20] |
|
|
|
|
[![codecov](https://codecov.io/gh/sc-forks/solidity-coverage/branch/beta/graph/badge.svg)][21] |
|
|
|
|
[![codecov](https://codecov.io/gh/sc-forks/solidity-coverage/branch/master/graph/badge.svg)][21] |
|
|
|
|
[![buidler](https://buidler.dev/buidler-plugin-badge.svg?1)][26] |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -16,9 +16,14 @@ |
|
|
|
|
|
|
|
|
|
## Install |
|
|
|
|
``` |
|
|
|
|
$ npm install --save-dev solidity-coverage@beta |
|
|
|
|
$ npm install --save-dev solidity-coverage |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
**Resources**: |
|
|
|
|
+ [0.7.0 release notes][31] |
|
|
|
|
+ [A guide][29] to upgrading from 0.6.x to 0.7.x |
|
|
|
|
+ [0.6.3 docs][30] |
|
|
|
|
|
|
|
|
|
### Truffle V5 |
|
|
|
|
|
|
|
|
|
**Add** this package to your plugins array in `truffle-config.js` ([Truffle docs][27]) |
|
|
|
@ -48,6 +53,12 @@ module.exports = { |
|
|
|
|
npx buidler coverage [command-options] |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
**Buidler Project Examples:** |
|
|
|
|
|
|
|
|
|
+ Simple: [buidler-metacoin][32] |
|
|
|
|
+ More complex: [MolochDao/moloch][33] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Usage notes: |
|
|
|
|
+ Coverage runs tests a little more slowly. |
|
|
|
|
+ Coverage launches its own in-process ganache server. |
|
|
|
@ -78,7 +89,6 @@ module.exports = { |
|
|
|
|
}; |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Option <img width=200/>| Type <img width=200/> | Default <img width=1300/> | Description <img width=800/> | |
|
|
|
|
| ------ | ---- | ------- | ----------- | |
|
|
|
|
| silent | *Boolean* | false | Suppress logging output | |
|
|
|
@ -158,17 +168,17 @@ $ yarn |
|
|
|
|
[1]: https://github.com/trufflesuite/ganache-core#options |
|
|
|
|
[2]: https://istanbul.js.org/docs/advanced/alternative-reporters/ |
|
|
|
|
[3]: https://mochajs.org/api/mocha |
|
|
|
|
[4]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#running-out-of-gas |
|
|
|
|
[5]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#running-out-of-memory |
|
|
|
|
[6]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#running-out-of-time |
|
|
|
|
[7]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#continuous-integration |
|
|
|
|
[8]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#notes-on-branch-coverage |
|
|
|
|
[4]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#running-out-of-gas |
|
|
|
|
[5]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#running-out-of-memory |
|
|
|
|
[6]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#running-out-of-time |
|
|
|
|
[7]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#continuous-integration |
|
|
|
|
[8]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#notes-on-branch-coverage |
|
|
|
|
[9]: https://sc-forks.github.io/metacoin/ |
|
|
|
|
[10]: https://coveralls.io/github/OpenZeppelin/openzeppelin-solidity?branch=master |
|
|
|
|
[11]: https://github.com/sc-forks/solidity-coverage/tree/beta/test/units |
|
|
|
|
[11]: https://github.com/sc-forks/solidity-coverage/tree/master/test/units |
|
|
|
|
[12]: https://github.com/sc-forks/solidity-coverage/issues |
|
|
|
|
[13]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/faq.md#notes-on-gas-distortion |
|
|
|
|
[14]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md |
|
|
|
|
[13]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/faq.md#notes-on-gas-distortion |
|
|
|
|
[14]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md |
|
|
|
|
[15]: #config-options |
|
|
|
|
[16]: https://blog.colony.io/code-coverage-for-solidity-eecfa88668c2 |
|
|
|
|
[17]: https://github.com/JoinColony/solcover |
|
|
|
@ -177,9 +187,14 @@ $ yarn |
|
|
|
|
[20]: https://circleci.com/gh/sc-forks/solidity-coverage |
|
|
|
|
[21]: https://codecov.io/gh/sc-forks/solidity-coverage |
|
|
|
|
[22]: https://cdn-images-1.medium.com/max/800/1*uum8t-31bUaa6dTRVVhj6w.png |
|
|
|
|
[23]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#workflow-hooks |
|
|
|
|
[24]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/advanced.md#skipping-tests |
|
|
|
|
[23]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#workflow-hooks |
|
|
|
|
[24]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#skipping-tests |
|
|
|
|
[25]: https://github.com/sc-forks/solidity-coverage/issues/417 |
|
|
|
|
[26]: https://buidler.dev/ |
|
|
|
|
[27]: https://www.trufflesuite.com/docs |
|
|
|
|
[28]: https://github.com/sc-forks/solidity-coverage/blob/beta/docs/api.md |
|
|
|
|
[28]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/api.md |
|
|
|
|
[29]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/upgrade.md#upgrading-from-06x-to-070 |
|
|
|
|
[30]: https://github.com/sc-forks/solidity-coverage/tree/0.6.x-final#solidity-coverage |
|
|
|
|
[31]: https://github.com/sc-forks/solidity-coverage/releases/tag/v0.7.0 |
|
|
|
|
[32]: https://github.com/sc-forks/buidler-e2e/tree/coverage |
|
|
|
|
[33]: https://github.com/sc-forks/moloch |
|
|
|
|