diff --git a/.gitignore b/.gitignore index d06c7bf..0cc9783 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ node_modules/ lib/ +coverage/ +.nyc_output/ npm-debug.log .DS_Store diff --git a/.travis.yml b/.travis.yml index 93380bf..85c6ad5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: node_js - node_js: - '6' - '6.2' +after_success: + - npm run test:coverage:travis diff --git a/package.json b/package.json index 3f83d25..2958566 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tatooine", - "version": "0.0.22", + "version": "0.0.23", "description": "Tatooine: A pluggable, simple and powerful web scraper.", "main": "lib/index.js", "author": "Beto Muniz ", @@ -8,6 +8,8 @@ "scripts": { "start": "nodemon index.js --exec babel-node", "test": "mocha test/**/*.js", + "test:coverage": "node_modules/.bin/nyc npm test && tap --cov --coverage-report=lcov test/*.test.js", + "test:coverage:travis": "node_modules/.bin/nyc npm test && node_modules/.bin/nyc report --reporter=text-lcov | node_modules/.bin/coveralls", "build": "babel src --presets babel-preset-es2015 --out-dir lib", "prepublish": "npm run build" }, @@ -31,11 +33,13 @@ "babel-plugin-transform-regenerator": "6.11.4", "babel-preset-es2015": "6.9.0", "chai": "3.5.0", + "coveralls": "2.11.11", "dirty-chai": "1.2.2", "eslint": "3.1.1", "eslint-config-airbnb-base": "5.0.0", "eslint-plugin-import": "1.12.0", "mocha": "2.5.3", - "nodemon": "1.10.0" + "nodemon": "1.10.0", + "nyc": "7.1.0" } } diff --git a/readme.md b/readme.md index 6f5934f..fa6840c 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,7 @@ [![Dependency Status](https://dependencyci.com/github/obetomuniz/tatooine/badge)](https://dependencyci.com/github/obetomuniz/tatooine) [![Build Status](https://travis-ci.org/obetomuniz/tatooine.svg?branch=master)](https://travis-ci.org/obetomuniz/tatooine) +[![Coverage Status](https://coveralls.io/repos/github/obetomuniz/tatooine/badge.svg?branch=master)](https://coveralls.io/github/obetomuniz/tatooine?branch=master) diff --git a/test/mocha.opts b/test/mocha.opts index 24b9bf1..4b5f0dc 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,4 +1,3 @@ ---reporter spec --compilers js:babel-register --slow 7500 --timeout 30000