make enclose & wrap work with sourceMap (#3396)

fixes #3313
This commit is contained in:
Alex Lam S.L
2019-05-04 20:25:52 +08:00
committed by GitHub
parent 11cdab745d
commit 354fec8a9c
6 changed files with 43 additions and 34 deletions

View File

@@ -712,7 +712,7 @@ describe("bin/uglifyjs", function() {
var command = uglifyjscmd + " test/input/enclose/input.js --enclose window,undefined:window --wrap exports";
exec(command, function(err, stdout, stderr) {
if (err) throw err;
assert.strictEqual(stdout, '(function(window,undefined){(function(exports){function enclose(){console.log("test enclose")}enclose()})(typeof exports=="undefined"?exports={}:exports)})(window);\n');
assert.strictEqual(stdout, '(function(exports){(function(window,undefined){function enclose(){console.log("test enclose")}enclose()})(window)})(typeof exports=="undefined"?exports={}:exports);\n');
done();
});
});