if (def.single_use) return;
if (top_retain(def)) return;
if (sym.fixed_value() !== right) return;
- return right instanceof AST_Object && right.properties.length > 0;
+ return right instanceof AST_Object
+ && right.properties.length > 0
+ && all(right.properties, function(prop) {
+ return prop instanceof AST_ObjectKeyVal;
+ });
}
});
var dir = path.resolve(path.dirname(module.filename), "compress");
if (file) {
var minify_options = require("./ufuzz/options.json").map(JSON.stringify);
- U.AST_Node.enable_validation();
log("--- {file}", { file: file });
var tests = parse_test(path.resolve(dir, file));
process.exit(Object.keys(tests).filter(function(name) {
}
});
var options_formatted = JSON.stringify(options, null, 4);
+ options.validate = true;
var result = U.minify(input_code, options);
if (result.error) {
log([
function test_case(test) {
log(" Running test [{name}]", { name: test.name });
+ U.AST_Node.enable_validation();
var output_options = test.beautify || {};
var expect;
if (test.expect) {