Skip to content

Node.js based forum software built for the modern web

chore: add coveralls

Yami74c989d60940
diff --git a/.travis.yml b/.travis.yml
index e89064595e..fb425fbfe5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,8 @@ before_install:
- sh -c "if [ '$DB' = 'redis' ]; then node app --setup=\"{\\\"url\\\":\\\"http://127.0.0.1:4567/\\\",\\\"secret\\\":\\\"abcdef\\\",\\\"database\\\":\\\"redis\\\",\\\"mongo:host\\\":\\\"127.0.0.1\\\",\\\"mongo:port\\\":27017,\\\"mongo:username\\\":\\\"\\\",\\\"mongo:password\\\":\\\"\\\",\\\"mongo:database\\\":0,\\\"redis:host\\\":\\\"127.0.0.1\\\",\\\"redis:port\\\":6379,\\\"redis:password\\\":\\\"\\\",\\\"redis:database\\\":0,\\\"admin:username\\\":\\\"admin\\\",\\\"admin:email\\\":\\\"[email protected]\\\",\\\"admin:password\\\":\\\"abcdef\\\",\\\"admin:password:confirm\\\":\\\"abcdef\\\"}\" --ci=\"{\\\"host\\\":\\\"127.0.0.1\\\",\\\"port\\\":6379,\\\"database\\\":0}\"; fi"
before_script:
- "until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done"
+after_success:
+ - "npm run coveralls"
language: node_js
env:
- CXX=g++-4.8 DB=mongodb
diff --git a/package.json b/package.json
index 43a6f46567..b92da13af7 100644
--- a/package.json
+++ b/package.json
@@ -14,6 +14,7 @@
"lint": "eslint --cache .",
"pretest": "npm run lint",
"test": "istanbul cover _mocha test",
+ "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
"test-windows": "_mocha test"
},
"dependencies": {
@@ -94,6 +95,7 @@
"xregexp": "~3.1.0"
},
"devDependencies": {
+ "coveralls": "^2.11.14",
"eslint": "^3.7.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^1.16.0",
@@ -102,7 +104,8 @@
"grunt": "~0.4.5",
"grunt-contrib-watch": "^1.0.0",
"istanbul": "^0.4.2",
- "mocha": "~3.1.0"
+ "mocha": "~3.1.0",
+ "mocha-lcov-reporter": "^1.2.0"
},
"bugs": {
"url": "https://github.com/NodeBB/NodeBB/issues"