mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-04 13:05:49 +00:00
Switch to Istanbul for code coverage. Add coverage to CI via coveralls.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -42,3 +42,4 @@ test/config.js
|
||||
/lib-cov
|
||||
/src-cov
|
||||
/coverage.html
|
||||
/coverage
|
||||
|
||||
@@ -4,3 +4,6 @@ node_js:
|
||||
notifications:
|
||||
email:
|
||||
false
|
||||
script: npm test --coverage
|
||||
after_success:
|
||||
- npm run coveralls
|
||||
|
||||
16
Makefile
16
Makefile
@@ -1,16 +0,0 @@
|
||||
all:
|
||||
./node_modules/.bin/gulp
|
||||
|
||||
test:
|
||||
mocha --reporter spec test/*-test.js
|
||||
|
||||
coverage:
|
||||
rm -rf src-cov
|
||||
mkdir src-cov
|
||||
mkdir src-cov/js
|
||||
jscoverage --no-highlight src/js/ripple src-cov/js/ripple
|
||||
RIPPLE_LIB_COV=1 mocha --reporter html-cov test/*-test.js > coverage.html
|
||||
rm -rf src-cov
|
||||
|
||||
|
||||
.PHONY: test coverage all
|
||||
@@ -1,5 +1,7 @@
|
||||
#The Ripple JavaScript Library
|
||||
|
||||
[](https://travis-ci.org/ripple/ripple-lib) [](https://coveralls.io/r/ripple/ripple-lib?branch=develop)
|
||||
|
||||
[](https://www.npmjs.org/package/ripple-lib)
|
||||
|
||||
`ripple-lib` connects to the Ripple network via the WebSocket protocol and runs in Node.js as well as in the browser.
|
||||
@@ -92,4 +94,4 @@ See [The `ripple-lib` Guides](docs/GUIDES.md) and [The `ripple-lib` API Referenc
|
||||
|
||||
**Generating code coverage**
|
||||
|
||||
ripple-lib uses `jscoverage` to generate code coverage. To generate a file `coverage.html`, run `make coverage`
|
||||
ripple-lib uses `istanbul` to generate code coverage. To create a code coverage report, run `npm test --coverage`. The report will be created in `coverage/lcov-report/`.
|
||||
|
||||
@@ -26,11 +26,14 @@
|
||||
"gulp-concat": "~2.2.0",
|
||||
"gulp-jshint": "~1.5.5",
|
||||
"webpack": "~1.1.10",
|
||||
"map-stream": "~0.1.0"
|
||||
"map-stream": "~0.1.0",
|
||||
"istanbul": "~0.2.10",
|
||||
"coveralls": "~2.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"pretest": "node_modules/.bin/gulp concat-sjcl",
|
||||
"test": "mocha --reporter spec test/*-test.js"
|
||||
"test": "./node_modules/.bin/istanbul test -x build/sjcl.js -x src/js/jsbn/* ./node_modules/.bin/_mocha -- --reporter spec test/*-test.js",
|
||||
"coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user