Skip to content

Commit 264cabf

Browse files
committed
Added code coverage
1 parent 3a0386c commit 264cabf

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ node_modules
2929

3030
.idea/
3131
*.iml
32+
coverage/

circle.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ machine:
55
database:
66
override:
77
- mysql -u ubuntu circle_test < test/setup.sql
8+
test:
9+
override:
10+
- npm run ci

package.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,23 @@
2828
"devDependencies": {
2929
"babel-core": "5.8.25",
3030
"babel-eslint": "4.1.3",
31-
"babel-loader": "5.3.2",
32-
"bluebird": "2.10.2",
33-
"chai": "3.3.0",
34-
"co": "^4.6.0",
31+
"babel-loader": "^5.3.2",
32+
"bluebird": "^2.10.2",
33+
"chai": "^3.3.0",
34+
"co": "4.6.0",
3535
"co-mocha": "1.1.2",
36-
"mocha": "2.3.3",
36+
"istanbul": "^0.4.0",
37+
"mocha": "^2.3.3",
3738
"standard": "5.3.1",
3839
"webpack": "1.12.2"
3940
},
4041
"scripts": {
41-
"lint": "node_modules/standard/bin/cmd.js src/index.js",
42-
"build": "node_modules/webpack/bin/webpack.js --config webpack.config.js --progress --colors",
43-
"mocha": "mocha --timeout 20000 --reporter spec mocha.start.js test/*.spec.js",
44-
"test": "npm run lint && npm run build && npm run mocha"
42+
"lint": "standard src/index.js",
43+
"build": "webpack --config webpack.config.js --progress --colors",
44+
"mocha": "mocha --timeout 20000 --reporter dot mocha.start.js test/*.spec.js",
45+
"cover": "istanbul cover --hook-run-in-context node_modules/mocha/bin/_mocha -- --timeout 20000 --reporter dot mocha.start.js test/*.spec.js",
46+
"test": "npm run lint && npm run build && npm run cover",
47+
"ci": "npm run test && cat coverage/lcov.info | coveralls || true"
4548
},
4649
"standard": {
4750
"parser": "babel-eslint"

0 commit comments

Comments
 (0)