Skip to content

Commit a534dfd

Browse files
committed
add test
1 parent ae18a5a commit a534dfd

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
it("bundle0 should include sourcemapped test.js", function() {
2+
var fs = require("fs");
3+
var source = fs.readFileSync(__filename + ".map", "utf-8");
4+
var map = JSON.parse(source);
5+
map.sources.should.containEql("webpack:///./test.js");
6+
});
7+
8+
require.include("./test.js");
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
var foo = {};
2+
3+
module.exports = foo;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
var webpack = require("../../../../");
2+
var path = require("path");
3+
var os = require("os");
4+
5+
module.exports = {
6+
node: {
7+
__dirname: false,
8+
__filename: false
9+
},
10+
entry: {
11+
bundle0: ["./index.js"]
12+
},
13+
output: {
14+
filename: "[name].js"
15+
},
16+
plugins: [
17+
new webpack.debug.ProfilingPlugin({
18+
outputPath: path.join(os.tmpdir(), "events.json")
19+
})
20+
],
21+
devtool: "source-map"
22+
};

0 commit comments

Comments
 (0)