chore(testing): only use TESTING=1 as the testing flag (#3877)

This commit is contained in:
Florent Vilmart
2017-05-28 17:04:25 -04:00
committed by Natan Rolnik
parent c99fdea6fb
commit 38a525ba5f
3 changed files with 5 additions and 5 deletions

View File

@@ -70,10 +70,10 @@
"lint": "eslint --cache ./", "lint": "eslint --cache ./",
"build": "babel src/ -d lib/ --copy-files", "build": "babel src/ -d lib/ --copy-files",
"pretest": "npm run lint", "pretest": "npm run lint",
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 $COVERAGE_OPTION jasmine", "test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 $COVERAGE_OPTION jasmine",
"test:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 jasmine", "test:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 jasmine",
"coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/nyc' npm test", "coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/nyc' npm test",
"coverage:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 node ./node_modules/.bin/nyc ./node_modules/jasmine/bin/jasmine.js", "coverage:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 node ./node_modules/.bin/nyc ./node_modules/jasmine/bin/jasmine.js",
"start": "node ./bin/parse-server", "start": "node ./bin/parse-server",
"prepublish": "npm run build" "prepublish": "npm run build"
}, },

View File

@@ -75,7 +75,7 @@ export class IAPValidationRouter extends PromiseRouter {
} }
} }
if (process.env.NODE_ENV == "test" && req.body.bypassAppStoreValidation) { if (process.env.TESTING == "1" && req.body.bypassAppStoreValidation) {
return getFileForProductIdentifier(productIdentifier, req); return getFileForProductIdentifier(productIdentifier, req);
} }

View File

@@ -2,7 +2,7 @@ import {nullParser} from './cli/utils/parsers';
const logsFolder = (() => { const logsFolder = (() => {
let folder = './logs/'; let folder = './logs/';
if (typeof process !== 'undefined' && process.env.NODE_ENV === 'test') { if (typeof process !== 'undefined' && process.env.TESTING === '1') {
folder = './test_logs/' folder = './test_logs/'
} }
if (process.env.PARSE_SERVER_LOGS_FOLDER) { if (process.env.PARSE_SERVER_LOGS_FOLDER) {