Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: skip test262 which is not yet resolved #24

Merged
merged 2 commits into from
May 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions test262/run_test262.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,25 @@ const UNSUPPORTED_FEATURES: string[] = [
"regexp-v-flag",
"regexp-duplicate-named-groups",
"import-assertions",
"decorators",
];

const WHITELIST: string[] = [];
const SKIP_FILES: string[] = [
// `1 < 2 > 3;` cannot be parsed well.
// This is because `< 2 >` is judged as TypeArguments.
// See https://github.com/TyrealHu/acorn-typescript/issues/21
"test/language/punctuators/S7.7_A1.js",
];


// Some keywords still don't throw an error.
// See https://github.com/TyrealHu/acorn-typescript/issues/23
const WHITELIST: string[] = [
// `this` variable name. e.g. `var this = 42`
"language/identifiers/val-this.js",
"language/identifiers/val-this-via-escape-hex.js",
"language/identifiers/val-this-via-escape-hex4.js",
].flatMap((s) => [s + " (default)", s + " (strict mode)"]);

run(
(content, { sourceType }) => {
Expand All @@ -25,8 +41,9 @@ run(
testsDirectory: path.dirname(require.resolve("test262/package.json")),
skip: (test) => {
return (
test.attrs.features &&
UNSUPPORTED_FEATURES.some((f) => test.attrs.features.includes(f))
(test.attrs.features &&
UNSUPPORTED_FEATURES.some((f) => test.attrs.features.includes(f))) ||
SKIP_FILES.includes(test.file)
);
},
whitelist: WHITELIST.map((filename) =>
Expand Down