
# test262 coverage

[test262](https://github.com/tc39/test262) is the official conformance test suite maintained by TC39 and the canonical way to compare JavaScript engines.

The suite covers language semantics, the standard library, `Intl`, `annexB` legacy web features, incubating tests in `staging`, and harness self-tests. The October 2026 refresh expands the pinned snapshot from 50,506 to 53,616 files, adding Unicode, calendar and proposal coverage. Current pass, fail, skip and blocked counts come from the canonical CI snapshot linked below.

The suite is pinned: the `test262` git submodule fixes the revision Phasis is measured against, and new upstream tests count only after the submodule is bumped. The full-suite snapshot in [`COMPAT.md`](https://github.com/inline0/phasis/blob/main/COMPAT.md) is regenerated by the `compat-matrix.yml` workflow, which is started by hand rather than on every push; `COMPAT.md` records when the snapshot was taken and against which commit.

[test262.fyi](https://test262.fyi) tracks production JavaScript engines. Compare results only when the suite revision, enabled features and execution modes agree.

## Running it locally

The runner needs the `test262` submodule and the repository's test classes, neither of which ships in the Composer package, so run it from a clone:

```bash
git clone https://github.com/inline0/phasis
cd phasis
git submodule update --init test262
composer install
./bin/test262 --jobs 4
```

Runtime varies by host and suite revision. The canonical CI workflow shards the full suite across runners.

Read failure paths from `compat.json` under `test262.failures`. To verify a change in a touched category locally:

```bash
./bin/test262 --category built-ins/Array
./bin/test262 --category language/expressions/yield --jobs 1 --limit 200
```

See [the CLI reference](/docs/cli.md#bin-test262) for the full flag set.

## Why this matters

JavaScript has subtle semantics — `NaN !== NaN`, `-0 === 0`, `[1] + 1 === "11"`, the exact order of property enumeration, the timing of Promise microtasks. A library that runs JS user code needs every one of those right, every time. test262 checks these rules directly. Node.js oracle scenarios separately compare observable program output; neither suite proves that every possible program behaves identically.
