aboutsummaryrefslogtreecommitdiff
path: root/test/mocha
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-02-26 00:40:33 +0800
committerGitHub <noreply@github.com>2017-02-26 00:40:33 +0800
commit16cd5d57a5cf7f5750104df0e5af246708fd493f (patch)
treee9ea6b8432ce0bddeeeef317f96765de1467ceeb /test/mocha
parent834f9f39245f1ddf5a29c579afd7ebcdb0afe585 (diff)
downloadtracifyjs-16cd5d57a5cf7f5750104df0e5af246708fd493f.tar.gz
tracifyjs-16cd5d57a5cf7f5750104df0e5af246708fd493f.zip
consolidate `evaluate` & `reduce_vars` (#1505)
- improve marking efficiency - apply smarter `const` replacement to `var` fixes #1501
Diffstat (limited to 'test/mocha')
-rw-r--r--test/mocha/comment_before_constant.js6
1 files changed, 3 insertions, 3 deletions
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}');
});