/*
* gulp-remove-logging
* Based on ehynds/grunt-remove-logging
*
* Copyright 2016, Valerian Saliou
* Author: Valerian Saliou <valerian@valeriansaliou.name>
*/
"use strict";
var path = require("path");
var assert = require("assert");
var gutil = require("gulp-util");
var gulp_remove_logging = require("./");
it("should xxxxx", function (cb) {
var stream = gulp_remove_logging({
plugins: ["transform-es2015-block-scoping"]
});
stream.on("data", function (file) {
assert(/var foo/.test(file.contents.toString()), file.contents.toString());
assert.equal(file.relative, "fixture.js");
});
stream.on("end", cb);
stream.write(new gutil.File({
cwd: __dirname,
base: path.join(__dirname, "fixture"),
path: path.join(__dirname, "fixture/fixture.jsx"),
contents: new Buffer("let foo;")
}));
stream.end();
});
|