diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-04-18 11:03:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 18:03:06 +0800 |
commit | 708973e51d418230918a2d0c2fcafb79d1e1c250 (patch) | |
tree | 65f9de4f3a24071e6171494f32438f20c938e980 /test/ufuzz | |
parent | dac9e69f9efb491c274670f36301fd38b0ef4dd6 (diff) | |
download | tracifyjs-708973e51d418230918a2d0c2fcafb79d1e1c250.tar.gz tracifyjs-708973e51d418230918a2d0c2fcafb79d1e1c250.zip |
report top-level default options (#3797)
Diffstat (limited to 'test/ufuzz')
-rw-r--r-- | test/ufuzz/index.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index e56408d9..908fabd1 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -1045,10 +1045,8 @@ function log_suspects(minify_options, component) { } function log_suspects_global(options) { - var o = {}; - UglifyJS.minify("", o); - var suspects = Object.keys(o).filter(function(component) { - return typeof o[component] != "object"; + var suspects = Object.keys(default_options).filter(function(component) { + return typeof default_options[component] != "object"; }).filter(function(component) { var m = JSON.parse(options); m[component] = false; @@ -1115,7 +1113,10 @@ function log(options) { errorln(JSON.stringify(JSON.parse(options), null, 2)); errorln(); if (!ok && typeof uglify_code == "string") { - Object.keys(default_options).forEach(log_suspects.bind(null, JSON.parse(options))); + Object.keys(default_options).filter(function(component) { + var defs = default_options[component]; + return defs && typeof defs == "object"; + }).forEach(log_suspects.bind(null, JSON.parse(options))); log_suspects_global(options); errorln("!!!!!! Failed... round " + round); } |