Generate tests.db on test run

This commit is contained in:
kiswa 2016-05-06 00:31:44 +00:00
parent 49b2ae5cf1
commit f06a1a4161
4 changed files with 13 additions and 3 deletions

1
.gitignore vendored
View File

@ -6,5 +6,6 @@ coverage.html
dist
node_modules
src/api/vendor
tests.db
typings

View File

@ -3,6 +3,7 @@
let gulp = require('gulp'),
fs = require('fs'),
del = require('del'),
touch = require('touch'),
merge = require('merge-stream'),
SystemBuilder = require('systemjs-builder'),
@ -147,12 +148,18 @@ gulp.task('coverage', ['tsc'], () => {
.pipe(gulp.dest('./'));
});
gulp.task('test-api', () => {
gulp.task('api-test-db', () => {
del('tests.db');
touch('tests.db');
fs.chmod('tests.db', '0666');
});
gulp.task('test-api', ['api-test-db'], () => {
return gulp.src('phpunit.xml')
.pipe(phpunit('./src/api/vendor/phpunit/phpunit/phpunit'));
});
gulp.task('test-api-single', () => {
gulp.task('test-api-single', ['api-test-db'], () => {
return gulp.src('phpunit.xml')
.pipe(phpunit('./src/api/vendor/phpunit/phpunit/phpunit',
{ group: 'single' }));
@ -182,7 +189,8 @@ gulp.task('watchtests', () => {
watchTs = gulp.watch(paths.ts, ['test-app']),
onChanged = (event) => {
console.log('File ' + event.path + ' was ' + event.type + '. Running tasks...');
console.log('File ' + event.path + ' was ' + event.type +
'. Running tasks...');
};
watchTests.on('change', onChanged);

View File

@ -62,6 +62,7 @@
"scss-base": "^1.1.0",
"systemjs": "^0.19.27",
"systemjs-builder": "^0.15.16",
"touch": "^1.0.0",
"typings": "^0.8.1",
"zone.js": "^0.6.12"
}

BIN
tests.db

Binary file not shown.