diff --git a/.gitignore b/.gitignore index 64094a4..6eaac54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Credentials +.coveralls.yml + # Dependencies /node_modules/ /web_demo/node_modules/ @@ -11,6 +14,7 @@ npm-debug.log *.log # Misc +coverage/ results lib-cov *.seed diff --git a/.travis.yml b/.travis.yml index 2b8143c..20d3b6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,10 @@ language: node_js before_install: - npm -g install npm@latest + - npm -g install npm@latest node_js: + - 8 - 6 - 4 - - 0.12 - - 0.11 +script: + - npm run coveralls +sudo: false diff --git a/README.md b/README.md index 6e800a4..6220c24 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ figo Node.js SDK [![npm version](http://img.shields.io/npm/v/figo.svg)](https://www.npmjs.org/package/figo) [![Build Status](https://secure.travis-ci.org/figo-connect/node-figo.svg)](https://travis-ci.org/figo-connect/node-figo) [![dependencies Status](https://david-dm.org/figo-connect/node-figo/status.svg)](https://david-dm.org/figo-connect/node-figo) +[![Coverage Status](https://coveralls.io/repos/github/figo-connect/node-figo/badge.svg)](https://coveralls.io/github/figo-connect/node-figo) figo Node.js SDK is a package that contains a set of wrappers for figo Connect API and enables you to start creating applications in a Node.js environment immediately. diff --git a/package.json b/package.json index 2b6532f..23311d9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "license": "MIT", "main": "./lib/figo.js", "scripts": { - "test": "mocha --timeout 60000 test/*" + "test": "mocha --timeout 60000 test/*", + "coveralls": "NODE_ENV=test ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --timeout 60000 --reporter spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js --verbose || true" }, "repository": { "type": "git", @@ -14,11 +15,14 @@ }, "devDependencies": { "async": "^2.0.1", - "chai": "", - "mocha": "" + "chai": "^4.1.1", + "coveralls": "^2.13.1", + "istanbul": "^0.4.5", + "mocha": "^3.5.0", + "mocha-lcov-reporter": "^1.3.0" }, "engines": { - "node": ">=0.11.0" + "node": ">=4.8.4" }, "dependencies": { "clone": "^1.0.2",