diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-02-29 17:33:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 17:33:48 +0000 |
commit | c8d60d698310aa263c4f6684b18680af07e07c87 (patch) | |
tree | b0b78e274c5928487b656de925b1e3f2eeadfae5 /test/mocha/minify.js | |
parent | 6092bf23de6608ad225cad61b934570604a5d3a4 (diff) | |
download | tracifyjs-c8d60d698310aa263c4f6684b18680af07e07c87.tar.gz tracifyjs-c8d60d698310aa263c4f6684b18680af07e07c87.zip |
detect `toplevel` option properly (#3735)
fixes #3730
Diffstat (limited to 'test/mocha/minify.js')
-rw-r--r-- | test/mocha/minify.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/mocha/minify.js b/test/mocha/minify.js index 786edd80..a41289f8 100644 --- a/test/mocha/minify.js +++ b/test/mocha/minify.js @@ -51,7 +51,7 @@ describe("minify", function() { "var a=n(3),b=r(12);", 'c("qux",a,b),o(11);', ].join("")); - assert.strictEqual(run_code(compressed), run_code(original)); + assert.strictEqual(run_code(compressed, true), run_code(original, true)); }); it("Should work with nameCache", function() { @@ -84,7 +84,7 @@ describe("minify", function() { "var a=n(3),b=r(12);", 'c("qux",a,b),o(11);', ].join("")); - assert.strictEqual(run_code(compressed), run_code(original)); + assert.strictEqual(run_code(compressed, true), run_code(original, true)); }); it("Should avoid cached names when mangling top-level variables", function() { @@ -113,7 +113,7 @@ describe("minify", function() { '"xxyyy";var y={y:2,a:3},a=4;', 'console.log(x.x,y.y,y.a,a);', ].join("")); - assert.strictEqual(run_code(compressed), run_code(original)); + assert.strictEqual(run_code(compressed, true), run_code(original, true)); }); it("Should avoid cached names when mangling inner-scoped variables", function() { @@ -137,7 +137,7 @@ describe("minify", function() { 'var o=function(o,n){console.log("extend");o();n()};function n(){console.log("A")}', 'var e=function(n){function e(){console.log("B")}o(e,n);return e}(n);', ].join("")); - assert.strictEqual(run_code(compressed), run_code(original)); + assert.strictEqual(run_code(compressed, true), run_code(original, true)); }); it("Should not parse invalid use of reserved words", function() { |