mirror of https://github.com/webpack/webpack.git
Add test to check debug IDs are in output and match
This commit is contained in:
parent
5821a9b8ea
commit
2fa1a23fed
|
@ -0,0 +1,9 @@
|
||||||
|
it("source should include debug id that matches debugId key in sourcemap", function() {
|
||||||
|
var fs = require("fs");
|
||||||
|
var source = fs.readFileSync(__filename, "utf-8");
|
||||||
|
var sourceMap = fs.readFileSync(__filename + ".map", "utf-8");
|
||||||
|
var map = JSON.parse(sourceMap);
|
||||||
|
expect(map.debugId).toBeDefined();
|
||||||
|
expect(source).toContain(`//# debugId=${map.debugId}`);
|
||||||
|
});
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
/** @type {import("../../../../").Configuration} */
|
||||||
|
module.exports = {
|
||||||
|
devtool: "source-map-debugids"
|
||||||
|
};
|
Loading…
Reference in New Issue