Skip to content

Run WPT and the Baseline score

Checked against c1b2fa4 on 2026-11-10. The files it covers are unchanged since.

niso is tested against the web’s own conformance suite, web-platform-tests. This is how to run it for your change.

Terminal window
tests/wpt/fetch.sh # once: WPT and web-features, pinned
cargo run --release -p niso-wpt -- dom/nodes # the tests under a directory
cargo run --release -p niso-wpt -- --features grid # the tests WPT maps to a web feature
cargo run --release -p niso-wpt # the whole Baseline suite, against the expectations
cargo run --release -p niso-wpt -- --update # record the results as the new expectations
node tests/wpt/baseline.mjs # score this system's expectations per feature

The fetch is the only step that needs the network. The whole suite is heavy: run a directory or a feature while you work, and the whole suite before you merge.

Each test runs headless in its own process, against expectations checked into the repository, so a run reports what changed: a subtest that newly passes or newly fails. When your change makes tests pass, --update records them, and the diff of the expectations goes into your branch.

tests/wpt/baseline.mjs turns the expectations into the score per web feature that the Web platform support page and the Baseline banners show, for Linux and macOS. Features niso leaves out on purpose, with their reasons, are in tests/wpt/excluded-features.txt.

Everything else (testdriver, the suite’s directories, test262, running on Node-API) is in WPT.