You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ NB: if you specify the port in your rpc options string, also declare it as a `port` option.
69
-
+**testCommand**: *{ String }* By default solidity-coverage runs `truffle test`. This option lets
70
-
you run an arbitrary test command instead, like: `mocha --timeout 5000`.
71
-
+ remember to set the config's port option to whatever port your tests use (probably 8545).
72
-
+ make sure you don't have another instance of testrpc running on that port (web3 will error if you do).
69
+
+**testCommand**: *{ String }* By default solidity-coverage runs `truffle test`. This option lets
70
+
you run an arbitrary test command instead, like: `mocha --timeout 5000`.
71
+
+ remember to set the config's port option to whatever port your tests use (probably 8545).
72
+
+ make sure you don't have another instance of testrpc running on that port (web3 will error if you do).
73
73
+**norpc**: *{ Boolean }* When true, solidity-coverage will not launch its own testrpc instance. This
74
74
can be useful if you are using a different vm like the [sc-forks version of pyethereum](https://github.com/sc-forks/pyethereum).
75
75
+**dir**: *{ String }* : Solidity-coverage usually looks for `contracts` and `test` folders in your root
76
-
directory. `dir` allows you to define a relative path from the root directory to those assets.
76
+
directory. `dir` allows you to define a relative path from the root directory to those assets.
77
77
`dir: "./<dirname>"` would tell solidity-coverage to look for `./<dirname>/contracts/` and `./<dirname>/test/`
78
+
+**copyNodeModules**: *{ Boolean }* : When true, will copy `node_modules` into the coverage environment. False by default, and may significantly increase the time for coverage to complete if enabled. Only enable if required.
78
79
79
80
**Example .solcover.js config file**
80
81
```javascript
@@ -89,28 +90,28 @@ module.exports = {
89
90
90
91
### Known Issues
91
92
92
-
**Hardcoded gas costs**: If you have hardcoded gas costs into your tests some of them may fail when using solidity-coverage.
93
-
This is because the instrumentation process increases the gas costs for using the contracts, due to
94
-
the extra events. If this is the case, then the coverage may be incomplete. To avoid this, using
93
+
**Hardcoded gas costs**: If you have hardcoded gas costs into your tests some of them may fail when using solidity-coverage.
94
+
This is because the instrumentation process increases the gas costs for using the contracts, due to
95
+
the extra events. If this is the case, then the coverage may be incomplete. To avoid this, using
95
96
`estimateGas` to estimate your gas costs should be more resilient in most cases.
96
97
97
98
**Using `require` in `migrations.js` files**: Truffle overloads Node's `require` function but
98
-
implements a simplified search algorithm for node_modules packages
99
+
implements a simplified search algorithm for node_modules packages
0 commit comments