implement --module (#5462)

This commit is contained in:
Alex Lam S.L
2022-05-23 22:45:47 +01:00
committed by GitHub
parent 740f93f5a9
commit c82fc1ef71
8 changed files with 45 additions and 12 deletions

View File

@@ -928,6 +928,14 @@ describe("bin/uglifyjs", function() {
done();
});
});
it("Should work with --module", function(done) {
var command = uglifyjscmd + " test/input/module/input.js --module -mc";
exec(command, function(err, stdout, stderr) {
if (err) throw err;
assert.strictEqual(stdout, read("test/input/module/expect.js"));
done();
});
});
it("Should compress swarm of unused variables with reasonable performance", function(done) {
var code = [
"console.log(function() {",