diff --git a/.istanbul.yml b/.istanbul.yml new file mode 100644 index 0000000000..8bb4ab0d88 --- /dev/null +++ b/.istanbul.yml @@ -0,0 +1,2 @@ +instrumentation: + excludes: ["**/spec/**", "**/PostgresStorageAdapter.js"] diff --git a/.travis.yml b/.travis.yml index 9490e1731f..ee210a2a84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_script: - psql -c 'create database parse_server_postgres_adapter_test_database;' -U postgres env: global: - - COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**' + - COVERAGE_OPTION='./node_modules/.bin/istanbul cover' matrix: - PARSE_SERVER_TEST_DB=postgres - MONGODB_VERSION=2.6.11 diff --git a/package.json b/package.json index 1e9c8d0215..501097dc8d 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "devDependencies": { "babel-cli": "6.8.0", "babel-core": "6.10.4", - "babel-istanbul": "0.11.0", "babel-plugin-syntax-flow": "6.8.0", "babel-plugin-transform-flow-strip-types": "6.8.0", "babel-preset-es2015": "6.6.0", @@ -61,18 +60,19 @@ "cross-env": "2.0.0", "deep-diff": "0.3.4", "gaze": "1.1.0", + "istanbul": "1.0.0-alpha.1", "jasmine": "2.4.1", "mongodb-runner": "3.3.2", "nodemon": "1.9.2" }, "scripts": { "dev": "npm run build && node bin/dev", - "build": "./node_modules/.bin/babel src/ -d lib/", - "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 ./node_modules/.bin/mongodb-runner start", - "test": "cross-env NODE_ENV=test TESTING=1 ./node_modules/.bin/babel-node $COVERAGE_OPTION ./node_modules/jasmine/bin/jasmine.js", - "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", - "posttest": "./node_modules/.bin/mongodb-runner stop", - "coverage": "cross-env COVERAGE_OPTION='./node_modules/babel-istanbul/lib/cli.js cover -x **/spec/**' npm test", + "build": "babel src/ -d lib/", + "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 mongodb-runner start", + "test": "cross-env NODE_ENV=test TESTING=1 babel-node $COVERAGE_OPTION ./node_modules/.bin/jasmine", + "test:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 babel-node ./node_modules/.bin/istanbul cover jasmine && npm run posttest", + "posttest": "mongodb-runner stop", + "coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/istanbul cover' npm test", "start": "node ./bin/parse-server", "prepublish": "npm run build" },