Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
byzyk committed Mar 18, 2018
1 parent ae18a5a commit a534dfd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
@@ -0,0 +1,8 @@
it("bundle0 should include sourcemapped test.js", function() {
var fs = require("fs");
var source = fs.readFileSync(__filename + ".map", "utf-8");
var map = JSON.parse(source);
map.sources.should.containEql("webpack:///./test.js");
});

require.include("./test.js");
@@ -0,0 +1,3 @@
var foo = {};

module.exports = foo;
@@ -0,0 +1,22 @@
var webpack = require("../../../../");
var path = require("path");
var os = require("os");

module.exports = {
node: {
__dirname: false,
__filename: false
},
entry: {
bundle0: ["./index.js"]
},
output: {
filename: "[name].js"
},
plugins: [
new webpack.debug.ProfilingPlugin({
outputPath: path.join(os.tmpdir(), "events.json")
})
],
devtool: "source-map"
};

0 comments on commit a534dfd

Please sign in to comment.