mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
fix(api tests): Let api test script pass the correct api version for helper.
This commit is contained in:
@@ -36,8 +36,8 @@ let testCount = (stdout, regexp) => {
|
||||
return parseInt(match && match[1] || 0);
|
||||
}
|
||||
|
||||
let testBin = (string) => {
|
||||
return `NODE_ENV=testing ./node_modules/.bin/${string}`;
|
||||
let testBin = (string, additionalEnvVariables = '') => {
|
||||
return `NODE_ENV=testing ${additionalEnvVariables} ./node_modules/.bin/${string}`;
|
||||
};
|
||||
|
||||
gulp.task('test:prepare:mongo', (cb) => {
|
||||
@@ -354,7 +354,7 @@ gulp.task('test:api-v3:integration:watch', ['test:prepare:server'], () => {
|
||||
gulp.task('test:api-v3:safe', ['test:prepare:server'], (done) => {
|
||||
awaitPort(TEST_SERVER_PORT).then(() => {
|
||||
let runner = exec(
|
||||
testBin(API_V3_TEST_COMMAND),
|
||||
testBin(API_V3_TEST_COMMAND, 'API_VERSION=v3'),
|
||||
(err, stdout, stderr) => {
|
||||
testResults.push({
|
||||
suite: 'API V3 Specs\t',
|
||||
|
||||
Reference in New Issue
Block a user