Skip to content

Commit 6e2fba4

Browse files
authored
Moves test runner logic to helper (#3041)
1 parent e4a7fbb commit 6e2fba4

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"scripts": {
6666
"dev": "npm run build && node bin/dev",
6767
"build": "babel src/ -d lib/",
68-
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 node $COVERAGE_OPTION ./spec/support/runner.js",
68+
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 $COVERAGE_OPTION jasmine",
6969
"test:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 node ./node_modules/jasmine/bin/jasmine.js && npm run posttest",
7070
"coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/istanbul cover' npm test",
7171
"coverage:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 node ./node_modules/babel-istanbul/lib/cli.js cover ./node_modules/jasmine/bin/jasmine.js && npm run posttest",

spec/helper.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
"use strict"
22
// Sets up a Parse API server for testing.
3+
const SpecReporter = require('jasmine-spec-reporter');
34

45
jasmine.DEFAULT_TIMEOUT_INTERVAL = process.env.PARSE_SERVER_TEST_TIMEOUT || 5000;
56

7+
jasmine.getEnv().clearReporters();
8+
jasmine.getEnv().addReporter(new SpecReporter());
9+
610
global.on_db = (db, callback, elseCallback) => {
711
if (process.env.PARSE_SERVER_TEST_DB == db) {
812
return callback();

spec/support/runner.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)