Skip to content

Commit b76a5c6

Browse files
flovilmartRafael Santos
authored and
Rafael Santos
committed
Restores code coverage (parse-community#2340)
1 parent 3cd836e commit b76a5c6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.istanbul.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
instrumentation:
2+
excludes: ["**/spec/**", "**/PostgresStorageAdapter.js"]

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ before_script:
1111
- psql -c 'create database parse_server_postgres_adapter_test_database;' -U postgres
1212
env:
1313
global:
14-
- COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**'
14+
- COVERAGE_OPTION='./node_modules/.bin/istanbul cover'
1515
matrix:
1616
- PARSE_SERVER_TEST_DB=postgres
1717
- MONGODB_VERSION=2.6.11

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"devDependencies": {
5252
"babel-cli": "6.8.0",
5353
"babel-core": "6.10.4",
54-
"babel-istanbul": "0.11.0",
5554
"babel-plugin-syntax-flow": "6.8.0",
5655
"babel-plugin-transform-flow-strip-types": "6.8.0",
5756
"babel-preset-es2015": "6.6.0",
@@ -61,18 +60,19 @@
6160
"cross-env": "2.0.0",
6261
"deep-diff": "0.3.4",
6362
"gaze": "1.1.0",
63+
"istanbul": "1.0.0-alpha.1",
6464
"jasmine": "2.4.1",
6565
"mongodb-runner": "3.3.2",
6666
"nodemon": "1.9.2"
6767
},
6868
"scripts": {
6969
"dev": "npm run build && node bin/dev",
70-
"build": "./node_modules/.bin/babel src/ -d lib/",
71-
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 ./node_modules/.bin/mongodb-runner start",
72-
"test": "cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node $COVERAGE_OPTION ./node_modules/jasmine/bin/jasmine.js",
73-
"test:win": "npm run pretest && 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 && npm run posttest",
74-
"posttest": "./node_modules/.bin/mongodb-runner stop",
75-
"coverage": "cross-env COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**' npm test",
70+
"build": "babel src/ -d lib/",
71+
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 mongodb-runner start",
72+
"test": "cross-env NODE_ENV=test TESTING=1 babel-node $COVERAGE_OPTION ./node_modules/.bin/jasmine",
73+
"test:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 babel-node ./node_modules/.bin/istanbul cover jasmine && npm run posttest",
74+
"posttest": "mongodb-runner stop",
75+
"coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/istanbul cover' npm test",
7676
"start": "node ./bin/parse-server",
7777
"prepublish": "npm run build"
7878
},

0 commit comments

Comments
 (0)