mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 04:29:40 +00:00
Add gulp watch task for api tests
This commit is contained in:
parent
c51caa0664
commit
7f6b392511
1 changed files with 6 additions and 0 deletions
|
|
@ -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`);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue