diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-24 01:56:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-24 09:56:02 +0800 |
commit | 6988cd95584ce8b66716c17afad9d2dcc71717d0 (patch) | |
tree | f120244c759de2ecc2b53329602a2fd3569d4633 /test/mocha/reduce.js | |
parent | 2390fae5c4b008aa1028ffdddaa071e4084ef8ac (diff) | |
download | tracifyjs-6988cd95584ce8b66716c17afad9d2dcc71717d0.tar.gz tracifyjs-6988cd95584ce8b66716c17afad9d2dcc71717d0.zip |
replace `keep_fargs` default to `false` (#4443)
Diffstat (limited to 'test/mocha/reduce.js')
-rw-r--r-- | test/mocha/reduce.js | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/test/mocha/reduce.js b/test/mocha/reduce.js index c06efd67..ce931fe9 100644 --- a/test/mocha/reduce.js +++ b/test/mocha/reduce.js @@ -37,8 +37,7 @@ describe("test/reduce.js", function() { it("Should retain setter arguments", function() { var result = reduce_test(read("test/input/reduce/setter.js"), { compress: { - keep_fargs: false, - unsafe: true, + unsafe_math: true, }, mangle: false, }, { @@ -110,28 +109,24 @@ describe("test/reduce.js", function() { }); it("Should print correct output for irreducible test case", function() { var result = reduce_test([ - "console.log(function f(a) {", - " return f.length;", - "}());", + "console.log(1 + .1 + .1);", ].join("\n"), { compress: { - keep_fargs: false, + unsafe_math: true, }, mangle: false, }); if (result.error) throw result.error; assert.strictEqual(result.code, [ "// (beautified)", - "console.log(function f(a) {", - " return f.length;", - "}());", - "// output: 1", + "console.log(1 + .1 + .1);", + "// output: 1.2000000000000002", "// ", - "// minify: 0", + "// minify: 1.2", "// ", "// options: {", '// "compress": {', - '// "keep_fargs": false', + '// "unsafe_math": true', "// },", '// "mangle": false', "// }", @@ -303,8 +298,7 @@ describe("test/reduce.js", function() { if (semver.satisfies(process.version, "<=0.10")) return; var result = reduce_test(read("test/input/reduce/diff_error.js"), { compress: { - keep_fargs: false, - unsafe: true, + unsafe_math: true, }, mangle: false, }, { |