diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-01-09 13:53:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-09 13:53:05 +0800 |
commit | 2e22d38a02c2e56666fcc0992e346dd5de97c6ec (patch) | |
tree | 44210c9ef83c28533270fbe72b2db8fccfc354b2 /test/mocha | |
parent | ce27bcd69a0a66bf145ee2f14927a3cfec9b0202 (diff) | |
download | tracifyjs-2e22d38a02c2e56666fcc0992e346dd5de97c6ec.tar.gz tracifyjs-2e22d38a02c2e56666fcc0992e346dd5de97c6ec.zip |
improve `rename` reproducibility (#2754)
fixes #2752
Diffstat (limited to 'test/mocha')
-rw-r--r-- | test/mocha/minify.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/mocha/minify.js b/test/mocha/minify.js index a304c5b5..d696a25f 100644 --- a/test/mocha/minify.js +++ b/test/mocha/minify.js @@ -373,4 +373,18 @@ describe("minify", function() { assert.strictEqual(stat.print_to_string(), "a=x()"); }); }); + + describe("rename", function() { + it("Should be repeatable", function() { + var code = "!function(x){return x(x)}(y);"; + for (var i = 0; i < 2; i++) { + assert.strictEqual(Uglify.minify(code, { + compress: { + toplevel: true, + }, + rename: true, + }).code, "var a2;(a2=y)(a2);"); + } + }); + }); }); |