2015-03-18 02:53:14 +08:00
|
|
|
it("should include test.js in SourceMap for bundle0 chunk", function() {
|
|
|
|
var fs = require("fs");
|
|
|
|
var source = fs.readFileSync(__filename + ".map", "utf-8");
|
|
|
|
var map = JSON.parse(source);
|
2018-01-27 23:05:21 +08:00
|
|
|
expect(map.sources).toContain("webpack:///./test.js");
|
2015-03-18 02:53:14 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
it("should not produce a SourceMap for vendors chunk", function() {
|
|
|
|
var fs = require("fs"),
|
2019-10-19 19:45:06 +08:00
|
|
|
path = require("path"),
|
|
|
|
assert = require("assert");
|
2018-01-27 06:59:38 +08:00
|
|
|
expect(fs.existsSync(path.join(__dirname, "vendors.js.map"))).toBe(false);
|
2015-03-18 02:53:14 +08:00
|
|
|
});
|
|
|
|
|
2019-10-19 19:45:06 +08:00
|
|
|
if (Math.random() < 0) require("./test.js");
|