webpack/test/configCases/source-map/namespace-source-path-no-tr.../index.js

9 lines
279 B
JavaScript
Raw Normal View History

2020-11-07 23:10:12 +08:00
it("should include [id].js in SourceMap", function () {
2020-11-07 22:33:24 +08:00
var fs = require("fs");
var source = fs.readFileSync(__filename + ".map", "utf-8");
var map = JSON.parse(source);
2020-11-07 23:10:12 +08:00
expect(map.sources).toContain("webpack:///./[id].js");
2020-11-07 22:33:24 +08:00
});
if (Math.random() < 0) require("./[id].js");