JavaScript · Node + browser

One ES module. Two real hosts.

Write a standards-only suite once and run it unchanged in Node.js and the browser. vanilla-test works with bundlers and without a bundler. No transpiler, source rewrite, or browser shim sits between the test and the runtime.

Install

Native ESM from npm

npm install vanilla-test

Import the package directly in Node. Bundlers resolve its bare imports normally; native browser ESM uses the complete import-map contract in the guide with no build step.

Read the import-map contract →
Runtime contract

Shared suite, thin adapters

The core returns an immutable result. A Node adapter maps it to an exit status; a browser adapter renders or records it. Host policy never leaks into the shared test source.

See complete adapters →

JavaScript documentation

Follow the lane you need.

These pages are the canonical detailed JavaScript documentation. Rust and C# selectors remain available from every paired page.

Build

Guide

Install, write the shared suite, and run Node plus Chrome.

Open guide →
Copy

Examples

Complete browser, Node, async, failure, and type-check patterns.

Open examples →
Integrate

API

Lifecycle, result, errors, completion events, and validators.

Open API →
Measure

Coverage CLI

Independent native V8 reports and gates for Node and Chrome.

Open coverage →
Verify

Testing

Shared-core, tooling, package, and browser evidence.

Open testing →
Inspect

Benchmarks

Raw samples, source, machine provenance, and reproducible commands.

Open benchmarks →