Skip to content

Commit

Permalink
Moves test runner logic to helper (#3041)
Browse files Browse the repository at this point in the history
  • Loading branch information
flovilmart committed Nov 24, 2016
1 parent e4a7fbb commit 6e2fba4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -65,7 +65,7 @@
"scripts": {
"dev": "npm run build && node bin/dev",
"build": "babel src/ -d lib/",
"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",
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 $COVERAGE_OPTION jasmine",
"test:win": "npm run pretest && cross-env NODE_ENV=test TESTING=1 node ./node_modules/jasmine/bin/jasmine.js && npm run posttest",
"coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/istanbul cover' npm test",
"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",
Expand Down
4 changes: 4 additions & 0 deletions spec/helper.js
@@ -1,8 +1,12 @@
"use strict"
// Sets up a Parse API server for testing.
const SpecReporter = require('jasmine-spec-reporter');

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

jasmine.getEnv().clearReporters();
jasmine.getEnv().addReporter(new SpecReporter());

global.on_db = (db, callback, elseCallback) => {
if (process.env.PARSE_SERVER_TEST_DB == db) {
return callback();
Expand Down
8 changes: 0 additions & 8 deletions spec/support/runner.js

This file was deleted.

0 comments on commit 6e2fba4

Please sign in to comment.