Merge pull request #41 from JoinColony/self-coverage

Self coverage
uport
area 8 years ago committed by GitHub
commit a1175b8eca
  1. 4
      README.md
  2. 6
      circle.yml
  3. 4
      package.json
  4. 2
      runCoveredTests.js

@ -1,6 +1,8 @@
#SolCover
![CircleCI Status](https://circleci.com/gh/JoinColony/solcover.svg?style=shield&circle-token=53d5360d290ef593c7bdce505b86ae8b9414e684)
[![codecov](https://codecov.io/gh/JoinColony/solcover/branch/master/graph/badge.svg)](https://codecov.io/gh/JoinColony/solcover)
###Code coverage for Solidity testing
![coverage example](https://cdn-images-1.medium.com/max/800/1*uum8t-31bUaa6dTRVVhj6w.png)
@ -57,7 +59,7 @@ From inside the SolCover directory, run
```node ./runCoveredTests.js```
Upon completion of the tests, open the `./coverage/index.html` file to browse the HTML coverage report.
Upon completion of the tests, open the `./coverage/lcov-report/index.html` file to browse the HTML coverage report.
###A few, uh, provisos, a, a couple of quid pro quos...
It is very likely that there are valid Solidity statements that this tool won't instrument correctly, as it's only been developed against a small number of contracts. If (and when) you find such cases, please raise an issue.

@ -5,4 +5,8 @@ dependencies:
pre:
- npm install -g truffle
- rm -rf node_modules/
test:
override:
- npm run test-cov
post:
- bash <(curl -s https://codecov.io/bash)

@ -7,7 +7,8 @@
"test": "test"
},
"scripts": {
"test": "mocha --timeout 30000"
"test": "mocha --timeout 30000",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --timeout 30000"
},
"author": "",
"license": "ISC",
@ -24,6 +25,7 @@
"ethereumjs-account": "~2.0.4",
"ethereumjs-tx": "1.1.2",
"ethereumjs-util": "~4.5.0",
"istanbul": "^0.4.5",
"merkle-patricia-tree": "~2.1.2",
"mocha": "^3.1.0",
"solc": "0.4.6"

@ -53,7 +53,7 @@ coverage.generate(events, './../originalContracts/');
fs.writeFileSync('./coverage.json', JSON.stringify(coverage.coverage));
shell.exec("./node_modules/istanbul/lib/cli.js report html")
shell.exec("./node_modules/istanbul/lib/cli.js report lcov")
testrpcProcess.kill();
shell.rm('-rf', './../contracts');
shell.mv('./../originalContracts', './../contracts');

Loading…
Cancel
Save