Update test262 parser tests ignoredFeatures list (#14019)
This commit is contained in:
@@ -5,8 +5,9 @@ import TestRunner from "../utils/parser-test-runner.js";
|
||||
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const ignoredFeatures = [
|
||||
const ignoredFeatures = new Set([
|
||||
"__getter__",
|
||||
"__proto__",
|
||||
"__setter__",
|
||||
"AggregateError",
|
||||
"Array.prototype.at",
|
||||
@@ -17,6 +18,7 @@ const ignoredFeatures = [
|
||||
"ArrayBuffer",
|
||||
"align-detached-buffer-semantics-with-web-reality",
|
||||
"arbitrary-module-namespace-names",
|
||||
"array-find-from-last",
|
||||
"async-functions",
|
||||
"async-iteration",
|
||||
"arrow-function",
|
||||
@@ -26,8 +28,10 @@ const ignoredFeatures = [
|
||||
"caller",
|
||||
"class",
|
||||
"class-fields-private",
|
||||
"class-fields-private-in",
|
||||
"class-fields-public",
|
||||
"class-methods-private",
|
||||
"class-static-block",
|
||||
"class-static-fields-private",
|
||||
"class-static-fields-public",
|
||||
"class-static-methods-private",
|
||||
@@ -49,6 +53,7 @@ const ignoredFeatures = [
|
||||
"destructuring-assignment",
|
||||
"destructuring-binding",
|
||||
"dynamic-import",
|
||||
"error-cause",
|
||||
"export-star-as-namespace-from-module",
|
||||
"FinalizationGroup",
|
||||
"FinalizationRegistry",
|
||||
@@ -64,19 +69,25 @@ const ignoredFeatures = [
|
||||
"Int8Array",
|
||||
"Int16Array",
|
||||
"Int32Array",
|
||||
"Intl-enumeration",
|
||||
"Intl.DateTimeFormat-datetimestyle",
|
||||
"Intl.DateTimeFormat-dayPeriod",
|
||||
"Intl.DateTimeFormat-extend-timezonename",
|
||||
"Intl.DateTimeFormat-fractionalSecondDigits",
|
||||
"Intl.DateTimeFormat-formatRange",
|
||||
"Intl.DisplayNames",
|
||||
"Intl.DisplayNames-v2",
|
||||
"Intl.ListFormat",
|
||||
"Intl.Locale",
|
||||
"Intl.Locale-info",
|
||||
"Intl.NumberFormat-unified",
|
||||
"Intl.NumberFormat-v3",
|
||||
"Intl.RelativeTimeFormat",
|
||||
"Intl.Segmenter",
|
||||
"IsHTMLDDA",
|
||||
"import.meta",
|
||||
"intl-normative-optional",
|
||||
"json-modules",
|
||||
"json-superset",
|
||||
"legacy-regexp",
|
||||
"let",
|
||||
@@ -85,6 +96,7 @@ const ignoredFeatures = [
|
||||
"new.target",
|
||||
"numeric-separator-literal",
|
||||
"Object.fromEntries",
|
||||
"Object.hasOwn",
|
||||
"Object.is",
|
||||
"object-rest",
|
||||
"object-spread",
|
||||
@@ -104,7 +116,9 @@ const ignoredFeatures = [
|
||||
"regexp-lookbehind",
|
||||
"regexp-named-groups",
|
||||
"regexp-unicode-property-escapes",
|
||||
"resizable-arraybuffer",
|
||||
"rest-parameters",
|
||||
"ShadowRealm",
|
||||
"SharedArrayBuffer",
|
||||
"Set",
|
||||
"String.fromCodePoint",
|
||||
@@ -136,6 +150,7 @@ const ignoredFeatures = [
|
||||
"tail-call-optimization",
|
||||
"template",
|
||||
"top-level-await",
|
||||
"Temporal",
|
||||
"TypedArray",
|
||||
"TypedArray.prototype.at",
|
||||
"TypedArray.prototype.item",
|
||||
@@ -148,14 +163,11 @@ const ignoredFeatures = [
|
||||
"WeakSet",
|
||||
"WeakRef",
|
||||
"well-formed-json-stringify",
|
||||
];
|
||||
]);
|
||||
|
||||
const ignoredTests = ["built-ins/RegExp/", "language/literals/regexp/"];
|
||||
|
||||
const featuresToPlugins = {
|
||||
__proto__: null,
|
||||
"import-assertions": "importAssertions",
|
||||
};
|
||||
const featuresToPlugins = new Map([["import-assertions", "importAssertions"]]);
|
||||
|
||||
const unmappedFeatures = new Set();
|
||||
|
||||
@@ -163,9 +175,9 @@ function* getPlugins(features) {
|
||||
if (!features) return;
|
||||
|
||||
for (const f of features) {
|
||||
if (featuresToPlugins[f]) {
|
||||
yield featuresToPlugins[f];
|
||||
} else if (!ignoredFeatures.includes(f)) {
|
||||
if (featuresToPlugins.has(f)) {
|
||||
yield featuresToPlugins.get(f);
|
||||
} else if (!ignoredFeatures.has(f)) {
|
||||
unmappedFeatures.add(f);
|
||||
}
|
||||
}
|
||||
@@ -207,13 +219,15 @@ runner
|
||||
.run()
|
||||
.then(() => {
|
||||
if (unmappedFeatures.size) {
|
||||
console.log("");
|
||||
console.log(
|
||||
console.warn("");
|
||||
console.warn(
|
||||
"The following Features are not currently mapped or ignored:"
|
||||
);
|
||||
console.log(
|
||||
console.warn(
|
||||
Array.from(unmappedFeatures).join("\n").replace(/^/gm, " ")
|
||||
);
|
||||
|
||||
process.exitCode = 1;
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user