用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/SocketDev/action --skill running-test262命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | running-test262 |
| description | Run the repo's canonical Test262 suite for parser/runtime conformance; never write ad hoc runners. |
| user-invocable | true |
| allowed-tools | Bash(node:*), Bash(pnpm:*), Bash(ls:*), Bash(cat:*), Bash(grep:*), Bash(find:*), Read |
| model | claude-haiku-4-5 |
| context | fork |
| metadata | {"internal":true} |
The fleet has multiple parsers + runtimes that conform to ECMA262 or to a TC39 proposal:
ultrathink/packages/acorn/: the JS parser, multiple lang ports (cpp/go/rust/typescript).ultrathink/packages/test262-parser-runner/: the canonical shared runner package.socket-btm/packages/temporal-infra/: Temporal-proposal C++ port.Every one of them ships its own scripts/test262-*.mts runner + an unsupported-features config. Running test262 by hand (downloading the suite, scanning the metadata blocks, running each test) is the wrong shape. The runners already encode the suite-traversal, the per-feature skip logic, the harness setup, and the result-aggregation. Always reach for the existing runner.
The fleet pins to a shared tc39/test262 SHA. As of 2026-05-21 both ultrathink + socket-btm pin 7e115f46a. When bumping in one repo, bump in the other so cross-fleet comparison stays apples-to-apples.
Annotation lives in each repo's .gitmodules with the pattern # test262-YYYY.MM.DD (commit-date of the pinned SHA, enforced by the gitmodules-comment-guard hook).
An allowlist entry is ONLY for non-parser test fails. Anything a parser should handle MUST NOT be allowlisted; it must be fixed in the parser. This is strict; the runners enforce it via design choices below.
What counts as "non-parser":
test262-config/test262.unsupported-features keyed on the TC39 feature name (NOT a test path).Reflect.*, Temporal.*) that the parser-conformance run can't evaluate. The runners skip these by classification, not per-path allowlist.What does NOT count and must be fixed in the parser:
If you feel tempted to add a per-test-path allowlist entry, the answer is almost always "the parser needs fixing." The unsupported-features file is the only escape valve and it's feature-name-keyed by design. You can't sneak a parser bug past it.
| Repo | Runner | Skip config |
|---|---|---|
| ultrathink/packages/acorn (multi-lane driver) | test/test262-compare.mts | per-lane runner config (inherits unsupported-features) |
| ultrathink/packages/acorn (per-lane) | lang/<lane>/scripts/test262.mts | test262-config/test262.unsupported-features (feature-name-keyed) |
| ultrathink/packages/test262-parser-runner | bin/test262-parser-runner.mts | passed via flags |
| socket-btm/packages/temporal-infra | test/scripts/test262-temporal-runner.mts | test262-config/test262.allowlist (Temporal-only path allowlist; reviewed manually for non-parser-fail justification) |
cd packages/acorn
# All 4 lanes, full suite
node test/test262-compare.mts
# Subset of lanes
node test/test262-compare.mts --lane rust,go
# All lanes, filtered to a single category
node test/test262-compare.mts --include 'language/expressions/await'
# Single test path, all lanes
node test/test262-compare.mts test/language/statements/class/private-method.js
Lanes: rust, go, cpp, typescript. Flags forward to each per-lane runner.
# Per-lane direct invocation
cd packages/acorn/lang/rust && node scripts/test262.mts
cd packages/acorn/lang/go && node scripts/test262.mts
cd packages/acorn/lang/cpp && node scripts/test262.mts
cd packages/acorn/lang/typescript && node scripts/test262.mts
# socket-btm temporal-infra
cd socket-btm/packages/temporal-infra && node test/scripts/test262-temporal-runner.mts
Pass the test path positionally:
# Single lane
node scripts/test262.mts test/language/expressions/await/await-in-nested-function.js
# All lanes
node test/test262-compare.mts test/language/expressions/await/await-in-nested-function.js
node scripts/test262.mts --include 'export' # regex on path
node scripts/test262.mts --exclude 'surrogate' # regex on path
node scripts/test262.mts --category module # named feature group
node scripts/test262.mts --include 'class' --exclude 'async'
Each repo also wires a vitest test that wraps the runner. Useful for CI integration and selective re-runs:
pnpm exec vitest run test/unit/test262.test.mts # ultrathink acorn
pnpm exec vitest run test/unit/test262-temporal.test.mts # socket-btm temporal
git submodule update --init --recursive./*--- features: [...] ---*/) to decide whether to run or skip. If a new TC39 feature is added upstream, classify it in the unsupported-features config first; do not let the runner silently pass tests for features the parser doesn't implement.tc39/test262 SHA. If you're investigating a flaky test, double-check both .gitmodules files first.The existing runners encode dozens of edge cases (strict-mode harness wrapping, async-throws semantics, error-name matching, the negative.phase distinction between parse vs early errors). Recreating that surface from scratch reliably misses cases. If you find yourself wanting to "just run a few test262 files by hand," reach for the runner with a filter arg instead.
tc39/test262 pin date all encoded in this skill. Read this skill before touching either system.