Skip to content

Commit ed3d504

Browse files
authored
Fix README for v0.8 release
1 parent 05ab320 commit ed3d504

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

README.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,33 @@
1414
see [the accompanying article][16].
1515
+ `solidity-coverage` is [Solcover][17]
1616

17+
## Requirements
18+
19+
+ Hardhat >= 2.11.0
20+
1721
## Install
1822
```
1923
$ yarn add solidity-coverage --dev
2024
```
2125

22-
**Resources**:
23-
+ [0.8.0 release notes][31]
24-
25-
### Hardhat
26-
27-
Beginning with v0.7.12, this tool supports Hardhat and runs directly on
28-
HardhatEVM.
29-
3026
**Require** the plugin in `hardhat.config.js` ([Hardhat docs][26])
3127
```javascript
3228
require('solidity-coverage')
3329
```
3430

35-
**Run**
31+
Or, if you are using TypeScript, add this to your hardhat.config.ts:
32+
```ts
33+
import 'solidity-coverage'
3634
```
37-
npx hardhat coverage [command-options]
38-
```
39-
40-
(Additional Hardhat-specific info can be found [here][37])
35+
**Resources**:
36+
+ [0.8.0 release notes][31]
4137

42-
### @openzeppelin/test-environment
4338

44-
OpenZeppelin have written their own coverage generation scripts for `test-environment` using the solidity-coverage API.
45-
A working example can be found at [openzeppelin-contracts, here.][35]
4639

47-
## Usage notes:
48-
+ Coverage runs tests a little more slowly.
49-
+ Coverage launches its own in-process ganache server.
50-
+ You can set [ganache options][1] using the `providerOptions` key in your `.solcover.js` [config][15].
51-
+ Coverage [distorts gas consumption][13]. Tests that check exact gas consumption should be [skipped][24].
52-
+ :warning: Contracts are compiled **without optimization**. Please report unexpected compilation faults to [issue 417][25]
40+
## Run
41+
```
42+
npx hardhat coverage [command-options]
43+
```
5344

5445
## Command Options
5546
| Option <img width=200/> | Example <img width=750/>| Description <img width=1000/> |
@@ -58,8 +49,7 @@ A working example can be found at [openzeppelin-contracts, here.][35]
5849
| solcoverjs | `--solcoverjs ./../.solcover.js` | Relative path from working directory to config. Useful for monorepo packages that share settings. (Path must be "./" prefixed) |
5950
| network | `--network development` | Use network settings defined in the Hardhat config |
6051
| temp[<sup>*</sup>][14] | `--temp build` | :warning: **Caution** :warning: Path to a *disposable* folder to store compilation artifacts in. Useful when your test setup scripts include hard-coded paths to a build directory. [More...][14] |
61-
| matrix | `--matrix` | Generate a JSON object that maps which mocha tests hit which lines of code. (Useful
62-
as an input for some fuzzing, mutation testing and fault-localization algorithms.) [More...][39]|
52+
| matrix | `--matrix` | Generate a JSON object that maps which mocha tests hit which lines of code. (Useful as an input for some fuzzing, mutation testing and fault-localization algorithms.) [More...][39]|
6353

6454
[<sup>*</sup> Advanced use][14]
6555

0 commit comments

Comments
 (0)