chore(testing): only use TESTING=1 as the testing flag (#3877)
This commit is contained in:
committed by
Natan Rolnik
parent
c99fdea6fb
commit
38a525ba5f
@@ -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"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user