mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
Add gulp watch task for api tests
This commit is contained in:
@@ -301,12 +301,18 @@ gulp.task('test:api', ['test:prepare:mongo'], (done) => {
|
||||
mocha.run((numberOfFailures) => {
|
||||
if (!process.env.RUN_INTEGRATION_TEST_FOREVER) {
|
||||
kill(server);
|
||||
process.exit(numberOfFailures);
|
||||
}
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('test:api:watch', () => {
|
||||
process.env.RUN_INTEGRATION_TEST_FOREVER = true;
|
||||
gulp.watch(['website/src/**', 'test/api/**'], ['test:api']);
|
||||
});
|
||||
|
||||
gulp.task('test:api:safe', ['test:prepare:mongo'], (done) => {
|
||||
let server = exec(`NODE_DB_URI="${TEST_DB_URI}" PORT="${API_TEST_SERVER_PORT}" node ./website/src/server.js`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user