diff --git a/.travis.yml b/.travis.yml index 53dc9acc7a..2e85f31ee0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ node_js: - "4.3" env: global: - - CODE_COVERAGE=1 + - COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**' matrix: - MONGODB_VERSION=2.6.11 - MONGODB_VERSION=3.0.8 diff --git a/bin/parse-server b/bin/parse-server index d3ade1e847..94ffe96439 100755 --- a/bin/parse-server +++ b/bin/parse-server @@ -1,2 +1 @@ -#!/usr/bin/env node require("../lib/cli/parse-server"); diff --git a/package.json b/package.json index f2f863f006..d2a0294ce1 100644 --- a/package.json +++ b/package.json @@ -56,9 +56,10 @@ "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 $(if [ \"$CODE_COVERAGE\" = \"1\" ]; then echo './node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**'; fi;) ./node_modules/jasmine/bin/jasmine.js", + "test": "cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node $COVERAGE_OPTION ./node_modules/jasmine/bin/jasmine.js", "posttest": "mongodb-runner stop", - "start": "./bin/parse-server", + "coverage": "cross-env COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**' npm test", + "start": "node ./bin/parse-server", "prepublish": "npm run build" }, "engines": {