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
Copy file name to clipboardExpand all lines: README.md
+21-8Lines changed: 21 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,8 +75,11 @@ can be useful if you are using a different vm like the [sc-forks version of pyet
75
75
+**dir**: *{ String }* : Solidity-coverage usually looks for `contracts` and `test` folders in your root
76
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.
79
-
+**skipFiles**: *{ Array }* : An array of contracts (with paths expressed relative to the `contracts` directory) that should be skipped when doing instrumentation. `Migrations.sol` is skipped by default, and does not need to be added to this configuration option if it is used.
78
+
+**copyNodeModules**: *{ Boolean }* : When true, will copy `node_modules` into the coverage environment.
79
+
False by default, and may significantly increase the time for coverage to complete if enabled. Only enable if required.
80
+
+**skipFiles**: *{ Array }* : An array of contracts (with paths expressed relative to the `contracts` directory)
81
+
that should be skipped when doing instrumentation. `Migrations.sol` is skipped by default,
82
+
and does not need to be added to this configuration option if it is used.
Because solidity-coverage copies an instrumented version of your project into a temporary folder, `require`
123
-
statements handled by Truffle internally won't resolve correctly.
124
122
125
123
**Using HDWalletProvider in `truffle.js`**: [See Truffle issue #348](https://github.com/trufflesuite/truffle/issues/348).
126
124
HDWalletProvider crashes solidity-coverage, so its constructor shouldn't be invoked while running this tool.
127
125
A workaround can be found at the zeppelin-solidity project
128
126
[here](https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/truffle.js#L8-L10), where a
129
127
shell script is used to set an environment variable which `truffle.js` checks before instantiating the wallet.
130
128
131
-
**Getting `Error: Invalid JSON RPC response: ""`** after the instrumentation or compilation steps. This can be resolved by setting the `norpc` option in `.solcover.js` to `true` and launching testrpc-sc from the command line in another window with:
129
+
**Getting `Error: Invalid JSON RPC response: ""`** after the instrumentation or compilation steps.
130
+
This error is intermittent and mysterious, affecting some projects more than others.
131
+
Can be resolved by setting the `norpc` option in
132
+
`.solcover.js` to `true` and launching testrpc-sc from the command line in another window with:
0 commit comments