From 3c1fd385faeea53be487e2e0156b90191b3702e6 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Wed, 16 Sep 2015 08:12:47 -0500 Subject: [PATCH] Rename existing api tests to api-legacy --- tasks/gulp-tests.js | 22 +++++++++---------- test/{api => api-legacy}/README.md | 0 test/{api => api-legacy}/anonymized.coffee | 0 test/{api => api-legacy}/api-helper.coffee | 0 test/{api => api-legacy}/challenges.coffee | 0 test/{api => api-legacy}/chat.coffee | 0 test/{api => api-legacy}/coupons.coffee | 0 test/{api => api-legacy}/get_user.coffee | 0 test/{api => api-legacy}/groups.coffee | 0 .../{api => api-legacy}/inAppPurchases.coffee | 0 test/{api => api-legacy}/party.coffee | 0 .../pushNotifications.coffee | 0 test/{api => api-legacy}/score.coffee | 0 test/{api => api-legacy}/status.coffee | 0 test/{api => api-legacy}/subscriptions.coffee | 0 test/{api => api-legacy}/todos.coffee | 0 test/{api => api-legacy}/users.coffee | 0 test/mocha.opts | 2 +- 18 files changed, 12 insertions(+), 12 deletions(-) rename test/{api => api-legacy}/README.md (100%) rename test/{api => api-legacy}/anonymized.coffee (100%) rename test/{api => api-legacy}/api-helper.coffee (100%) rename test/{api => api-legacy}/challenges.coffee (100%) rename test/{api => api-legacy}/chat.coffee (100%) rename test/{api => api-legacy}/coupons.coffee (100%) rename test/{api => api-legacy}/get_user.coffee (100%) rename test/{api => api-legacy}/groups.coffee (100%) rename test/{api => api-legacy}/inAppPurchases.coffee (100%) rename test/{api => api-legacy}/party.coffee (100%) rename test/{api => api-legacy}/pushNotifications.coffee (100%) rename test/{api => api-legacy}/score.coffee (100%) rename test/{api => api-legacy}/status.coffee (100%) rename test/{api => api-legacy}/subscriptions.coffee (100%) rename test/{api => api-legacy}/todos.coffee (100%) rename test/{api => api-legacy}/users.coffee (100%) diff --git a/tasks/gulp-tests.js b/tasks/gulp-tests.js index e3b469a9a2..580372adc7 100644 --- a/tasks/gulp-tests.js +++ b/tasks/gulp-tests.js @@ -104,9 +104,9 @@ gulp.task('test:server_side:safe', ['test:prepare:build'], (cb) => { pipe(runner); }); -gulp.task('test:api', ['test:prepare:mongo'], (cb) => { +gulp.task('test:api-legacy', ['test:prepare:mongo'], (cb) => { let runner = exec( - testBin("istanbul cover -i 'website/src/**' --dir coverage/api ./node_modules/.bin/_mocha -- test/api"), + testBin("istanbul cover -i 'website/src/**' --dir coverage/api-legacy ./node_modules/.bin/_mocha -- test/api-legacy"), (err, stdout, stderr) => { cb(err); } @@ -114,12 +114,12 @@ gulp.task('test:api', ['test:prepare:mongo'], (cb) => { pipe(runner); }); -gulp.task('test:api:safe', ['test:prepare:mongo'], (cb) => { +gulp.task('test:api-legacy:safe', ['test:prepare:mongo'], (cb) => { let runner = exec( - testBin("istanbul cover -i 'website/src/**' --dir coverage/api ./node_modules/.bin/_mocha -- test/api"), + testBin("istanbul cover -i 'website/src/**' --dir coverage/api-legacy ./node_modules/.bin/_mocha -- test/api-legacy"), (err, stdout, stderr) => { testResults.push({ - suite: 'API Specs\t', + suite: 'API (legacy) Specs', pass: testCount(stdout, /(\d+) passing/), fail: testCount(stderr, /(\d+) failing/), pend: testCount(stdout, /(\d+) pending/) @@ -130,15 +130,15 @@ gulp.task('test:api:safe', ['test:prepare:mongo'], (cb) => { pipe(runner); }); -gulp.task('test:api:clean', (cb) => { - pipe(exec(testBin("mocha test/api"), () => cb())); +gulp.task('test:api-legacy:clean', (cb) => { + pipe(exec(testBin("mocha test/api-legacy"), () => cb())); }); -gulp.task('test:api:watch', [ +gulp.task('test:api-legacy:watch', [ 'test:prepare:mongo', - 'test:api:clean' + 'test:api-legacy:clean' ], () => { - gulp.watch(['website/src/**', 'test/api/**'], ['test:api:clean']); + gulp.watch(['website/src/**', 'test/api-legacy/**'], ['test:api-legacy:clean']); }); gulp.task('test:karma', ['test:prepare:build'], (cb) => { @@ -238,7 +238,7 @@ gulp.task('test', [ 'test:common:safe', 'test:server_side:safe', 'test:karma:safe', - 'test:api:safe', + 'test:api-legacy:safe', 'test:e2e:safe' ], () => { let totals = [0,0,0]; diff --git a/test/api/README.md b/test/api-legacy/README.md similarity index 100% rename from test/api/README.md rename to test/api-legacy/README.md diff --git a/test/api/anonymized.coffee b/test/api-legacy/anonymized.coffee similarity index 100% rename from test/api/anonymized.coffee rename to test/api-legacy/anonymized.coffee diff --git a/test/api/api-helper.coffee b/test/api-legacy/api-helper.coffee similarity index 100% rename from test/api/api-helper.coffee rename to test/api-legacy/api-helper.coffee diff --git a/test/api/challenges.coffee b/test/api-legacy/challenges.coffee similarity index 100% rename from test/api/challenges.coffee rename to test/api-legacy/challenges.coffee diff --git a/test/api/chat.coffee b/test/api-legacy/chat.coffee similarity index 100% rename from test/api/chat.coffee rename to test/api-legacy/chat.coffee diff --git a/test/api/coupons.coffee b/test/api-legacy/coupons.coffee similarity index 100% rename from test/api/coupons.coffee rename to test/api-legacy/coupons.coffee diff --git a/test/api/get_user.coffee b/test/api-legacy/get_user.coffee similarity index 100% rename from test/api/get_user.coffee rename to test/api-legacy/get_user.coffee diff --git a/test/api/groups.coffee b/test/api-legacy/groups.coffee similarity index 100% rename from test/api/groups.coffee rename to test/api-legacy/groups.coffee diff --git a/test/api/inAppPurchases.coffee b/test/api-legacy/inAppPurchases.coffee similarity index 100% rename from test/api/inAppPurchases.coffee rename to test/api-legacy/inAppPurchases.coffee diff --git a/test/api/party.coffee b/test/api-legacy/party.coffee similarity index 100% rename from test/api/party.coffee rename to test/api-legacy/party.coffee diff --git a/test/api/pushNotifications.coffee b/test/api-legacy/pushNotifications.coffee similarity index 100% rename from test/api/pushNotifications.coffee rename to test/api-legacy/pushNotifications.coffee diff --git a/test/api/score.coffee b/test/api-legacy/score.coffee similarity index 100% rename from test/api/score.coffee rename to test/api-legacy/score.coffee diff --git a/test/api/status.coffee b/test/api-legacy/status.coffee similarity index 100% rename from test/api/status.coffee rename to test/api-legacy/status.coffee diff --git a/test/api/subscriptions.coffee b/test/api-legacy/subscriptions.coffee similarity index 100% rename from test/api/subscriptions.coffee rename to test/api-legacy/subscriptions.coffee diff --git a/test/api/todos.coffee b/test/api-legacy/todos.coffee similarity index 100% rename from test/api/todos.coffee rename to test/api-legacy/todos.coffee diff --git a/test/api/users.coffee b/test/api-legacy/users.coffee similarity index 100% rename from test/api/users.coffee rename to test/api-legacy/users.coffee diff --git a/test/mocha.opts b/test/mocha.opts index 3f0bf9cd67..3ebc76edfc 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -6,4 +6,4 @@ --debug --compilers coffee:coffee-script --globals io ---require test/api/api-helper +--require test/api-legacy/api-helper