fix timing error caused by not returning stream

This commit is contained in:
Philipp Kunz 2016-02-01 02:07:41 +01:00
parent 822734e545
commit 6c57a4703f
2 changed files with 5 additions and 4 deletions

View File

@ -81,11 +81,12 @@ var NpmtsDefault;
}); });
plugins.gulp.task("defaultTestTS", function () { plugins.gulp.task("defaultTestTS", function () {
plugins.beautylog.log("now compiling" + " ts/test.ts".blue); plugins.beautylog.log("now compiling" + " ts/test.ts".blue);
plugins.gulp.src(paths.testTS) var stream = plugins.gulp.src(paths.testTS)
.pipe(plugins.g.typescript({ .pipe(plugins.g.typescript({
out: "test.js" out: "test.js"
})) }))
.pipe(plugins.gulp.dest(paths.testDir)); .pipe(plugins.gulp.dest(paths.testDir));
return stream;
}); });
plugins.gulp.task("defaultCleanup", function (cb) { plugins.gulp.task("defaultCleanup", function (cb) {
plugins.beautylog.success("TypeScript for this module compiled successfully."); plugins.beautylog.success("TypeScript for this module compiled successfully.");
@ -108,7 +109,6 @@ var NpmtsTests;
plugins.beautylog.info("Now running mocha tests"); plugins.beautylog.info("Now running mocha tests");
var mocha = new plugins.mocha(); // Instantiate a Mocha instance. var mocha = new plugins.mocha(); // Instantiate a Mocha instance.
mocha.addFile(plugins.path.join(paths.testDir, "test.js")); mocha.addFile(plugins.path.join(paths.testDir, "test.js"));
// Run the tests.
mocha.run(function (failures) { mocha.run(function (failures) {
process.on('exit', function () { process.on('exit', function () {
process.exit(failures); process.exit(failures);

View File

@ -23,11 +23,12 @@ module NpmtsDefault {
plugins.gulp.task("defaultTestTS", function(){ plugins.gulp.task("defaultTestTS", function(){
plugins.beautylog.log("now compiling" + " ts/test.ts".blue); plugins.beautylog.log("now compiling" + " ts/test.ts".blue);
plugins.gulp.src(paths.testTS) var stream = plugins.gulp.src(paths.testTS)
.pipe(plugins.g.typescript({ .pipe(plugins.g.typescript({
out: "test.js" out: "test.js"
})) }))
.pipe(plugins.gulp.dest(paths.testDir)) .pipe(plugins.gulp.dest(paths.testDir));
return stream;
}); });
plugins.gulp.task("defaultCleanup",function(cb){ plugins.gulp.task("defaultCleanup",function(cb){