2016-01-31 23:04:05 +00:00
|
|
|
/// <reference path="./typings/main.d.ts" />
|
2016-01-24 23:42:11 +00:00
|
|
|
var plugins = {
|
|
|
|
beautylog: require("beautylog"),
|
|
|
|
gulp: require("gulp"),
|
2016-02-01 01:28:43 +00:00
|
|
|
gulpBrowser: require("../index.js"),
|
2016-01-24 23:42:11 +00:00
|
|
|
gulpCallFunction: require("gulp-callfunction")
|
|
|
|
};
|
2016-02-01 02:10:58 +00:00
|
|
|
describe("gulpBrowser", function () {
|
|
|
|
describe(".browserify", function () {
|
|
|
|
it("should run through smoothly", function (done) {
|
|
|
|
this.timeout(15000);
|
|
|
|
plugins.gulp.task('gulpBrowserNormal', function (cb) {
|
|
|
|
var stream = plugins.gulp.src('./test/browserifyGulpTest.js')
|
|
|
|
.pipe(plugins.gulpBrowser.browserify())
|
|
|
|
.pipe(plugins.gulp.dest("./test/result/"))
|
|
|
|
.pipe(plugins.gulpCallFunction(done));
|
|
|
|
return stream;
|
|
|
|
});
|
|
|
|
plugins.gulp.start.apply(plugins.gulp, ['gulpBrowserNormal']);
|
|
|
|
});
|
|
|
|
});
|
2015-10-26 22:27:33 +00:00
|
|
|
});
|
2016-01-24 23:42:11 +00:00
|
|
|
plugins.gulp.task('gulpBrowserTestError', function (cb) {
|
2016-02-01 01:28:43 +00:00
|
|
|
plugins.beautylog.info("Expecting an error:");
|
2016-02-01 02:10:58 +00:00
|
|
|
var stream = plugins.gulp.src('./test/browserifyGulpTestError.js')
|
2016-01-24 23:42:11 +00:00
|
|
|
.pipe(plugins.gulpBrowser.browserify())
|
2016-02-01 02:10:58 +00:00
|
|
|
.pipe(plugins.gulp.dest("./test/result/"));
|
2015-12-05 21:29:06 +00:00
|
|
|
return stream;
|
|
|
|
});
|