fix(api tests): Let api test script pass the correct api version for helper.

This commit is contained in:
Blade Barringer
2015-11-20 19:02:08 -06:00
parent c87200f582
commit 2fa2e0f483

View File

@@ -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',