Skip to content

Commit

Permalink
Run test coverage with nyc (#12)
Browse files Browse the repository at this point in the history
* run test coverage with nyc

* ignore gulpfile.js from test coverage

No need to test development file
  • Loading branch information
makemek authored Mar 27, 2017
1 parent b5b1db7 commit 0c7248a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ script:
- npm run eslint
- npm run coverage

after_script:
- "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
after_success:
- npm run coveralls
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@
},
"bin": {
"mocha": "./node_modules/mocha/bin/mocha",
"istanbul": "./node_modules/.bin/istanbul",
"eslint": "./node_modules/.bin/eslint"
},
"nyc": {
"exclude": ["gulpfile.js"]
},
"scripts": {
"build": "gulp build && gulp import",
"prestart": "npm run build",
"start": "node bin/www",
"dev": "npm run build && gulp browser-sync",
"coverage": "npm run pretest && istanbul cover ./node_modules/mocha/bin/_mocha",
"coverage": "nyc npm test",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"eslint": "eslint src/**/*.js test/**/*.js bin/**",
"utest": "mocha",
"pretest": "npm run build",
Expand Down Expand Up @@ -65,10 +68,10 @@
"gulp-rename": "1.2.2",
"gulp-uglify": "2.0.1",
"gulp-util": "3.0.8",
"istanbul": "0.4.5",
"mocha": "3.1.2",
"nock": "9.0.2",
"nodemon": "1.11.0",
"nyc": "10.1.2",
"should": "11.1.1",
"sinon": "1.17.6",
"slash": "1.0.0",
Expand Down

0 comments on commit 0c7248a

Please sign in to comment.