Skip to content

Commit 578ab22

Browse files
Update test262 parser tests ignoredFeatures list (#14019)
1 parent 2597184 commit 578ab22

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

scripts/parser-tests/test262/index.js

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import TestRunner from "../utils/parser-test-runner.js";
55

66
const dirname = path.dirname(fileURLToPath(import.meta.url));
77

8-
const ignoredFeatures = [
8+
const ignoredFeatures = new Set([
99
"__getter__",
10+
"__proto__",
1011
"__setter__",
1112
"AggregateError",
1213
"Array.prototype.at",
@@ -17,6 +18,7 @@ const ignoredFeatures = [
1718
"ArrayBuffer",
1819
"align-detached-buffer-semantics-with-web-reality",
1920
"arbitrary-module-namespace-names",
21+
"array-find-from-last",
2022
"async-functions",
2123
"async-iteration",
2224
"arrow-function",
@@ -26,8 +28,10 @@ const ignoredFeatures = [
2628
"caller",
2729
"class",
2830
"class-fields-private",
31+
"class-fields-private-in",
2932
"class-fields-public",
3033
"class-methods-private",
34+
"class-static-block",
3135
"class-static-fields-private",
3236
"class-static-fields-public",
3337
"class-static-methods-private",
@@ -49,6 +53,7 @@ const ignoredFeatures = [
4953
"destructuring-assignment",
5054
"destructuring-binding",
5155
"dynamic-import",
56+
"error-cause",
5257
"export-star-as-namespace-from-module",
5358
"FinalizationGroup",
5459
"FinalizationRegistry",
@@ -64,19 +69,25 @@ const ignoredFeatures = [
6469
"Int8Array",
6570
"Int16Array",
6671
"Int32Array",
72+
"Intl-enumeration",
6773
"Intl.DateTimeFormat-datetimestyle",
6874
"Intl.DateTimeFormat-dayPeriod",
75+
"Intl.DateTimeFormat-extend-timezonename",
6976
"Intl.DateTimeFormat-fractionalSecondDigits",
7077
"Intl.DateTimeFormat-formatRange",
7178
"Intl.DisplayNames",
79+
"Intl.DisplayNames-v2",
7280
"Intl.ListFormat",
7381
"Intl.Locale",
82+
"Intl.Locale-info",
7483
"Intl.NumberFormat-unified",
84+
"Intl.NumberFormat-v3",
7585
"Intl.RelativeTimeFormat",
7686
"Intl.Segmenter",
7787
"IsHTMLDDA",
7888
"import.meta",
7989
"intl-normative-optional",
90+
"json-modules",
8091
"json-superset",
8192
"legacy-regexp",
8293
"let",
@@ -85,6 +96,7 @@ const ignoredFeatures = [
8596
"new.target",
8697
"numeric-separator-literal",
8798
"Object.fromEntries",
99+
"Object.hasOwn",
88100
"Object.is",
89101
"object-rest",
90102
"object-spread",
@@ -104,7 +116,9 @@ const ignoredFeatures = [
104116
"regexp-lookbehind",
105117
"regexp-named-groups",
106118
"regexp-unicode-property-escapes",
119+
"resizable-arraybuffer",
107120
"rest-parameters",
121+
"ShadowRealm",
108122
"SharedArrayBuffer",
109123
"Set",
110124
"String.fromCodePoint",
@@ -136,6 +150,7 @@ const ignoredFeatures = [
136150
"tail-call-optimization",
137151
"template",
138152
"top-level-await",
153+
"Temporal",
139154
"TypedArray",
140155
"TypedArray.prototype.at",
141156
"TypedArray.prototype.item",
@@ -148,24 +163,21 @@ const ignoredFeatures = [
148163
"WeakSet",
149164
"WeakRef",
150165
"well-formed-json-stringify",
151-
];
166+
]);
152167

153168
const ignoredTests = ["built-ins/RegExp/", "language/literals/regexp/"];
154169

155-
const featuresToPlugins = {
156-
__proto__: null,
157-
"import-assertions": "importAssertions",
158-
};
170+
const featuresToPlugins = new Map([["import-assertions", "importAssertions"]]);
159171

160172
const unmappedFeatures = new Set();
161173

162174
function* getPlugins(features) {
163175
if (!features) return;
164176

165177
for (const f of features) {
166-
if (featuresToPlugins[f]) {
167-
yield featuresToPlugins[f];
168-
} else if (!ignoredFeatures.includes(f)) {
178+
if (featuresToPlugins.has(f)) {
179+
yield featuresToPlugins.get(f);
180+
} else if (!ignoredFeatures.has(f)) {
169181
unmappedFeatures.add(f);
170182
}
171183
}
@@ -207,13 +219,15 @@ runner
207219
.run()
208220
.then(() => {
209221
if (unmappedFeatures.size) {
210-
console.log("");
211-
console.log(
222+
console.warn("");
223+
console.warn(
212224
"The following Features are not currently mapped or ignored:"
213225
);
214-
console.log(
226+
console.warn(
215227
Array.from(unmappedFeatures).join("\n").replace(/^/gm, " ")
216228
);
229+
230+
process.exitCode = 1;
217231
}
218232
})
219233
.catch(err => {

0 commit comments

Comments
 (0)