From 6c57a4703fb42ebb8bebccf6eb2f405861cc6d6b Mon Sep 17 00:00:00 2001 From: PhilKunz Date: Mon, 1 Feb 2016 02:07:41 +0100 Subject: [PATCH] fix timing error caused by not returning stream --- index.js | 4 ++-- ts/npmts.default.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 127e6e0..6b27a0a 100644 --- a/index.js +++ b/index.js @@ -81,11 +81,12 @@ var NpmtsDefault; }); plugins.gulp.task("defaultTestTS", function () { 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({ out: "test.js" })) .pipe(plugins.gulp.dest(paths.testDir)); + return stream; }); plugins.gulp.task("defaultCleanup", function (cb) { plugins.beautylog.success("TypeScript for this module compiled successfully."); @@ -108,7 +109,6 @@ var NpmtsTests; plugins.beautylog.info("Now running mocha tests"); var mocha = new plugins.mocha(); // Instantiate a Mocha instance. mocha.addFile(plugins.path.join(paths.testDir, "test.js")); - // Run the tests. mocha.run(function (failures) { process.on('exit', function () { process.exit(failures); diff --git a/ts/npmts.default.ts b/ts/npmts.default.ts index b0030cc..085fea1 100644 --- a/ts/npmts.default.ts +++ b/ts/npmts.default.ts @@ -23,11 +23,12 @@ module NpmtsDefault { plugins.gulp.task("defaultTestTS", function(){ 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({ out: "test.js" })) - .pipe(plugins.gulp.dest(paths.testDir)) + .pipe(plugins.gulp.dest(paths.testDir)); + return stream; }); plugins.gulp.task("defaultCleanup",function(cb){