diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/evaluate.js | 2 | ||||
-rw-r--r-- | test/compress/reduce_vars.js | 16 | ||||
-rw-r--r-- | test/mocha/comment_before_constant.js | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index ae5e58d6..5cefadc8 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -615,7 +615,7 @@ call_args: { const a = 1; console.log(1); +function(a) { - return a; + return 1; }(1); } } diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index d9d02efa..0ee201c0 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -134,8 +134,8 @@ modified: { } function f2() { - var b = 2, c = 3; - b = c; + var b = 2; + b = 3; console.log(1 + b); console.log(b + 3); console.log(4); @@ -143,8 +143,8 @@ modified: { } function f3() { - var b = 2, c = 3; - b *= c; + var b = 2; + b *= 3; console.log(1 + b); console.log(b + 3); console.log(4); @@ -236,7 +236,7 @@ unsafe_evaluate_object: { function f0(){ var a = 1; var b = {}; - b[a] = 2; + b[1] = 2; console.log(4); } @@ -280,7 +280,7 @@ unsafe_evaluate_array: { function f0(){ var a = 1; var b = []; - b[a] = 2; + b[1] = 2; console.log(4); } @@ -373,8 +373,8 @@ passes: { } expect: { function f() { - var b = 2, c = 3; - b = c; + var b = 2; + b = 3; console.log(1 + b); console.log(b + 3); console.log(4); diff --git a/test/mocha/comment_before_constant.js b/test/mocha/comment_before_constant.js index cfdb6da1..eaa8691c 100644 --- a/test/mocha/comment_before_constant.js +++ b/test/mocha/comment_before_constant.js @@ -7,7 +7,7 @@ describe("comment before constant", function() { it("Should test comment before constant is retained and output after mangle.", function() { var result = Uglify.minify(js, { fromString: true, - compress: { collapse_vars: false }, + compress: { collapse_vars: false, reduce_vars: false }, mangle: {}, output: { comments: true }, }); @@ -17,9 +17,9 @@ describe("comment before constant", function() { it("Should test code works when comments disabled.", function() { var result = Uglify.minify(js, { fromString: true, - compress: { collapse_vars: false }, + compress: { collapse_vars: false, reduce_vars: false }, mangle: {}, - output: {}, + output: { comments: false }, }); assert.strictEqual(result.code, 'function f(){var n=!1;return n}'); }); |