Update test262 and flow tests (#7925)
This commit is contained in:
@@ -31,3 +31,20 @@ types/member/reserved_words.js
|
||||
types/parameter_defaults/migrated_0032.js
|
||||
types/typecasts_invalid/migrated_0001.js
|
||||
class_method_kinds/polymorphic_getter.js
|
||||
internal_slot/interface_method.js
|
||||
internal_slot/object_method.js
|
||||
internal_slot/object_variance.js
|
||||
numbers/underscored_bin.js
|
||||
numbers/underscored_float.js
|
||||
numbers/underscored_float_whole.js
|
||||
numbers/underscored_hex.js
|
||||
numbers/underscored_number.js
|
||||
numbers/underscored_oct.js
|
||||
typeapp_call/function_call.js
|
||||
typeapp_call/function_call_optional.js
|
||||
typeapp_call/method_call.js
|
||||
typeapp_call/method_call_computed.js
|
||||
typeapp_call/method_call_optional2.js
|
||||
typeapp_call/new.js
|
||||
typeapp_call/new_noparens.js
|
||||
types/declare_class/proto.js
|
||||
|
||||
@@ -83,18 +83,27 @@ function update_whitelist(summary) {
|
||||
const contains = (tests, file) =>
|
||||
tests.some(({ test }) => test.file === file);
|
||||
|
||||
const result = fs
|
||||
const disallowed = summary.disallowed.success.concat(
|
||||
summary.disallowed.failure
|
||||
);
|
||||
|
||||
const oldLines = fs
|
||||
.readFileSync(WHITELIST_PATH, "utf8")
|
||||
.trim()
|
||||
.split("\n")
|
||||
.filter(line => {
|
||||
const file = line.replace(/#.*$/, "").trim();
|
||||
return (
|
||||
!contains(summary.disallowed.success, file) &&
|
||||
!contains(summary.disallowed.failure, file) &&
|
||||
summary.unrecognized.indexOf(file) === -1
|
||||
!contains(disallowed, file) && summary.unrecognized.indexOf(file) === -1
|
||||
);
|
||||
})
|
||||
.join("\n");
|
||||
});
|
||||
|
||||
const newLines = disallowed
|
||||
.map(({ test }) => test.file)
|
||||
.filter(test => oldLines.indexOf(test) === -1);
|
||||
|
||||
const result = oldLines.concat(newLines).join("\n") + "\n";
|
||||
|
||||
fs.writeFileSync(WHITELIST_PATH, result);
|
||||
}
|
||||
|
||||
@@ -116,6 +125,7 @@ const flowOptionsMapping = {
|
||||
esproposal_class_static_fields: "classProperties",
|
||||
esproposal_export_star_as: "exportNamespaceFrom",
|
||||
esproposal_decorators: "decorators-legacy",
|
||||
esproposal_nullish_coalescing: "nullishCoalescingOperator",
|
||||
esproposal_optional_chaining: "optionalChaining",
|
||||
types: "flowComments",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user