mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +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);
|
return parseInt(match && match[1] || 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
let testBin = (string) => {
|
let testBin = (string, additionalEnvVariables = '') => {
|
||||||
return `NODE_ENV=testing ./node_modules/.bin/${string}`;
|
return `NODE_ENV=testing ${additionalEnvVariables} ./node_modules/.bin/${string}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task('test:prepare:mongo', (cb) => {
|
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) => {
|
gulp.task('test:api-v3:safe', ['test:prepare:server'], (done) => {
|
||||||
awaitPort(TEST_SERVER_PORT).then(() => {
|
awaitPort(TEST_SERVER_PORT).then(() => {
|
||||||
let runner = exec(
|
let runner = exec(
|
||||||
testBin(API_V3_TEST_COMMAND),
|
testBin(API_V3_TEST_COMMAND, 'API_VERSION=v3'),
|
||||||
(err, stdout, stderr) => {
|
(err, stdout, stderr) => {
|
||||||
testResults.push({
|
testResults.push({
|
||||||
suite: 'API V3 Specs\t',
|
suite: 'API V3 Specs\t',
|
||||||
|
|||||||
Reference in New Issue
Block a user