Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Commit ffb94de

Browse files
authored
Merge pull request #29 from feathersjs/code-coverage
adding code coverage
2 parents 3a8f67a + 91dd3c9 commit ffb94de

6 files changed

Lines changed: 42 additions & 5 deletions

File tree

.istanbul.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
verbose: false
2+
instrumentation:
3+
root: ./src/
4+
excludes:
5+
- lib/
6+
include-all-sources: true
7+
reporting:
8+
print: summary
9+
reports:
10+
- html
11+
- text
12+
- lcov
13+
watermarks:
14+
statements: [50, 80]
15+
lines: [50, 80]
16+
functions: [50, 80]
17+
branches: [50, 80]

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.editorconfig
2-
.jshintrc
32
.travis.yml
3+
.istanbul.yml
44
.babelrc
55
.idea/
66
src/

.travis.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1+
sudo: false
12
language: node_js
23
node_js:
34
- 'node'
4-
- 'iojs'
5+
- '6'
6+
- '4'
7+
- 'iojs' #end of life Jan. 2017
8+
- '0.12' #end of life Jan. 2017
9+
- '0.10' #end of life Jan. 2017
10+
addons:
11+
code_climate:
12+
repo_token: 'd9f42f8f2e37d2901823173fc96052de64f71b273a9320377cb11f5f878a7928'
13+
before_script:
14+
- npm install -g codeclimate-test-reporter
15+
after_script:
16+
- codeclimate-test-reporter < coverage/lcov.info

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# feathers-primus
22

33
[![Build Status](https://travis-ci.org/feathersjs/feathers-primus.png?branch=master)](https://travis-ci.org/feathersjs/feathers-primus)
4+
[![Code Climate](https://codeclimate.com/github/feathersjs/feathers-primus/badges/gpa.svg)](https://codeclimate.com/github/feathersjs/feathers-primus)
5+
[![Test Coverage](https://codeclimate.com/github/feathersjs/feathers-primus/badges/coverage.svg)](https://codeclimate.com/github/feathersjs/feathers-primus/coverage)
6+
[![Dependency Status](https://img.shields.io/david/feathersjs/feathers-primus.svg?style=flat-square)](https://david-dm.org/feathersjs/feathers-primus)
7+
[![Download Status](https://img.shields.io/npm/dm/feathers-primus.svg?style=flat-square)](https://www.npmjs.com/package/feathers-primus)
48

59
> The Feathers Primus real-time API provider
610

mocha.opts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--recursive test/
2+
--compilers js:babel-core/register

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
"compile": "rm -rf lib/ && babel -d lib/ src/",
3535
"watch": "babel --watch -d lib/ src/",
3636
"jshint": "jshint src/. test/. --config",
37-
"mocha": "mocha test/ --recursive --compilers js:babel-core/register",
38-
"test": "npm run compile && npm run jshint && npm run mocha"
37+
"mocha": "mocha --opts mocha.opts",
38+
"coverage": "istanbul cover _mocha -- --opts mocha.opts",
39+
"test": "npm run compile && npm run jshint && npm run coverage"
3940
},
4041
"directories": {
4142
"lib": "lib"
@@ -56,10 +57,11 @@
5657
"babel-plugin-add-module-exports": "^0.2.0",
5758
"babel-plugin-transform-object-assign": "^6.3.13",
5859
"babel-preset-es2015": "^6.3.13",
59-
"feathers": "^2.0.0-pre.1",
60+
"feathers": "^2.0.0",
6061
"feathers-commons": "^0.7.2",
6162
"feathers-hooks": "^1.5.2",
6263
"feathers-memory": "^0.8.0",
64+
"istanbul": "^1.1.0-alpha.1",
6365
"jshint": "^2.8.0",
6466
"lodash": "^4.0.1",
6567
"mocha": "^3.0.0",

0 commit comments

Comments
 (0)