enhance inline & unused (#5245)

This commit is contained in:
Alex Lam S.L
2022-01-01 21:40:43 +00:00
committed by GitHub
parent 8d0422b6f3
commit 87a7426598
17 changed files with 992 additions and 236 deletions

View File

@@ -1,14 +1,26 @@
var assert = require("assert");
var exec = require("child_process").exec;
var semver = require("semver");
var UglifyJS = require("../..");
describe("spidermonkey export/import sanity test", function() {
it("Should produce a functional build when using --self with spidermonkey", function(done) {
this.timeout(120000);
var uglifyjs = '"' + process.argv[0] + '" bin/uglifyjs';
var options = semver.satisfies(process.version, "<=0.12") ? "-mc hoist_funs" : "-mc";
var command = [
uglifyjs + " --self -cm --wrap SpiderUglify -o spidermonkey",
uglifyjs + " -p spidermonkey -cm",
[
uglifyjs,
"--self",
options,
"--wrap SpiderUglify",
"-o spidermonkey",
].join(" "),
[
uglifyjs,
"-p spidermonkey",
options,
].join(" "),
].join(" | ");
exec(command, { maxBuffer: 1048576 }, function(err, stdout) {
if (err) throw err;