File: index.js

package info (click to toggle)
node-webpack 5.75.0%2Bdfsg%2B~cs17.16.14-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 161,436 kB
  • sloc: javascript: 167,338; makefile: 15; sh: 6
file content (10 lines) | stat: -rw-r--r-- 478 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
it("should not include sourcesContent if noSources option is used", function() {
	var fs = require("fs");
	var source = fs.readFileSync(__filename, "utf-8");
  var match = /\/\/# sourceMappingURL\s*=\s*data:application\/json;charset=utf-8;base64,(.*)\\n\/\/#/.exec(source);
  var mapString = Buffer.from(match[1], 'base64').toString('utf-8');
	var map = JSON.parse(mapString);
	expect(map).not.toHaveProperty("sourcesContent");
});

if (Math.random() < 0) require("./test.js");