diff --git a/.gitignore b/.gitignore index f894770..263c210 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules .DS_Store npm-debug.log package-lock.json +.nyc_output/ diff --git a/.travis.yml b/.travis.yml index bff76ff..8e1935d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,13 @@ language: node_js + node_js: stable + script: - npm run test-browsers + addons: hosts: - airtap.local sauce_connect: true + +after_success: npm run coverage diff --git a/README.md b/README.md index f4c8125..44f59e7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![npm](https://img.shields.io/npm/v/level-js.svg)](https://www.npmjs.com/package/level-js) [![Travis](https://secure.travis-ci.org/Level/level-js.svg?branch=master)](http://travis-ci.org/Level/level-js) [![npm](https://img.shields.io/npm/dm/level-js.svg)](https://www.npmjs.com/package/level-js) +[![Coverage Status](https://coveralls.io/repos/github/Level/level-js/badge.svg)](https://coveralls.io/github/Level/level-js) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) ## Table of Contents diff --git a/package.json b/package.json index d7eabe9..6f22537 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,9 @@ "license": "MIT", "main": "index.js", "scripts": { - "test": "standard && airtap --local test/index.js", - "test-browsers": "standard && airtap --sauce-connect --loopback airtap.local test/index.js", + "test": "standard && airtap --local --coverage test/index.js", + "test-browsers": "standard && airtap --sauce-connect --loopback airtap.local --coverage test/index.js", + "coverage": "nyc report --reporter=text-lcov | coveralls", "remark": "remark README.md CONTRIBUTORS.md CHANGELOG.md UPGRADING.md -o" }, "files": [ @@ -37,7 +38,9 @@ "devDependencies": { "airtap": "0.1.0", "buffer": "~5.1.0", + "coveralls": "^3.0.2", "level-community": "~3.0.0", + "nyc": "^12.0.2", "remark-cli": "^5.0.0", "remark-collapse": "~0.1.2", "remark-git-contributors": "~0.2.1",