diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-06-10 15:51:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-10 15:51:00 +0100 |
commit | ed69adedcd7140fd93d888d6b9dd46a6153adc7f (patch) | |
tree | 0f385f160cc9ea283d54edd733e336c739980d5c /test/mocha/reduce.js | |
parent | 1dbf7d4a3af7bf870d61b029120078c0ef499350 (diff) | |
download | tracifyjs-ed69adedcd7140fd93d888d6b9dd46a6153adc7f.tar.gz tracifyjs-ed69adedcd7140fd93d888d6b9dd46a6153adc7f.zip |
fix corner case in `--reduce-test` (#3985)
Diffstat (limited to 'test/mocha/reduce.js')
-rw-r--r-- | test/mocha/reduce.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/mocha/reduce.js b/test/mocha/reduce.js index 271358be..c1864735 100644 --- a/test/mocha/reduce.js +++ b/test/mocha/reduce.js @@ -296,4 +296,18 @@ describe("test/reduce.js", function() { "// }", ]).join("\n")); }); + it("Should handle corner cases when intermediate case differs only in Error.message", 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, + }, + mangle: false, + }, { + verbose: false, + }); + if (result.error) throw result.error; + assert.strictEqual(result.code, read("test/input/reduce/diff_error.reduced.js")); + }); }); |