Merge pull request #807 from ParsePlatform/flovilmart.fasterTests

Adds optional coverage for faster tests
This commit is contained in:
Florent Vilmart
2016-03-03 13:16:35 -05:00
2 changed files with 6 additions and 3 deletions

View File

@@ -5,8 +5,11 @@ language: node_js
node_js:
- "4.3"
env:
- MONGODB_VERSION=2.6.11
- MONGODB_VERSION=3.0.8
global:
- CODE_COVERAGE=1
matrix:
- MONGODB_VERSION=2.6.11
- MONGODB_VERSION=3.0.8
cache:
directories:
- $HOME/.mongodb/versions/downloads

View File

@@ -56,7 +56,7 @@
"dev": "npm run build && bin/dev",
"build": "./node_modules/.bin/babel src/ -d lib/",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.0.8} ./node_modules/.bin/mongodb-runner start",
"test": "cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node ./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/** ./node_modules/jasmine/bin/jasmine.js",
"test": "cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node $([[ $CODE_COVERAGE == 1 ]] && echo './node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**') ./node_modules/jasmine/bin/jasmine.js",
"posttest": "mongodb-runner stop",
"start": "./bin/parse-server",
"prepublish": "npm run build"