Skip to content

Commit 771ad8f

Browse files
committed
Implement code coverage.
1 parent b35c38b commit 771ad8f

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

.coveralls.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
repo_token: 5kn7Xw8YAtWbwqqwmtPT55Sil0knFJz62

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/node_modules
2+
/coverage
23
npm-debug.log

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Travis build status](http://img.shields.io/travis/gajus/react-css-modules/master.svg?style=flat)](https://travis-ci.org/gajus/react-css-modules)
44
[![NPM version](http://img.shields.io/npm/v/react-css-modules.svg?style=flat)](https://www.npmjs.org/package/react-css-modules)
5+
[![Coverage Status](https://coveralls.io/repos/gajus/react-css-modules/badge.svg?branch=master&service=github)](https://coveralls.io/github/gajus/react-css-modules?branch=master)
56

67
<img src='./README/react-css-modules.png' height='150' />
78

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,20 @@
2525
"devDependencies": {
2626
"babel": "^5.8.21",
2727
"babel-eslint": "^4.1.0",
28+
"babel-istanbul": "^0.3.19",
2829
"chai": "^3.2.0",
30+
"coveralls": "^2.11.4",
2931
"eslint": "^1.2.1",
3032
"eslint-plugin-react": "^3.3.0",
3133
"jsdom": "^6.2.0",
3234
"mocha": "^2.2.5",
35+
"mocha-lcov-reporter": "0.0.2",
3336
"react": "^0.14.0-beta3",
3437
"react-addons-test-utils": "^0.14.0-beta3"
3538
},
3639
"scripts": {
37-
"test": "./node_modules/.bin/eslint ./src/ ./test/ && mocha",
40+
"lint": "./node_modules/.bin/eslint ./src/ ./test/",
41+
"test": "npm run lint && node ./node_modules/.bin/babel-istanbul cover ./node_modules/.bin/_mocha && cat ./coverage/lcov.info | coveralls",
3842
"build": "babel ./src/ --out-dir ./dist/",
3943
"watch": "babel --watch ./src/ --out-dir ./dist/"
4044
}

0 commit comments

Comments
 (0)