Skip to content

Commit 363119b

Browse files
committed
test(istanbul): Added istanbul for code coverage reporting
1 parent 517539c commit 363119b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
.idea
33
.sass-cache
44
bower_components
5+
coverage

Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
* [Mocha](http://mochajs.org/) and [Chai](http://chaijs.com/) for testing
1010
* Test before commiting using [ghooks](https://github.com/gtramontina/ghooks)
1111
* Lint using [babel-eslint](https://github.com/babel/babel-eslint)
12+
* Code coverage recording with [istanbul](https://gotwarlost.github.io/istanbul/)
1213

1314
##Development
1415
Supported tasks are `grunt`, `grunt watch` and `grunt build`
1516

1617
##License
1718
MIT @ 2015
1819

20+

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"description": "A boilerplate to write plugins in pure JavaScript using ES2015",
55
"main": "dist/lunar.js",
66
"scripts": {
7-
"commit":"git cz",
8-
"test": "rollup -c && mocha test/bundle.test.js",
7+
"commit": "git cz",
8+
"test":"rollup -c && mocha test/bundle.test.js",
9+
"test:coverage": "rollup -c && istanbul cover -x *.test.js _mocha -- -R spec test/bundle.test.js",
910
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
1011
},
1112
"license": "MIT",
@@ -25,6 +26,7 @@
2526
"grunt-contrib-watch": "^0.6.1",
2627
"grunt-eslint": "^17.3.1",
2728
"grunt-rollup": "^0.6.1",
29+
"istanbul": "^0.4.1",
2830
"load-grunt-tasks": "^3.3.0",
2931
"mocha": "^2.3.4",
3032
"rollup": "^0.21.2",

0 commit comments

Comments
 (0)