Rstest
What it is
Rstest is a free, open-source testing framework for JavaScript and TypeScript built on Rsbuild and Rspack. It bundles tests using Rspack’s dependency-graph build pipeline and applies SWC transforms. Projects can reuse Rsbuild, Rslib, or Rspack configuration, including aliases, transforms, and plugins. Tests run in Node.js, simulated DOM environments using jsdom or happy-dom, and real browsers. Browser Mode uses Playwright to run tests in Chromium, Firefox, and WebKit, while an integration can run end-to-end tests against local, preview, or deployed URLs. Rstest can also load real Module Federation remotes in Node, JSDOM, and Browser Mode tests. Built-in capabilities include Jest-compatible assertions, snapshots, mocks, spies, file-level isolation, lifecycle hooks, reporters, and filtering. For CI workflows, it supports multi-project testing, sharding, blob report merging, and coverage thresholds. The Rstack VS Code extension lets users browse, run, and debug tests. Quick start requires Node.js 20.19.0 or newer; the project recommends the Node.js LTS version. It is released under the MIT license.
For and against
For
- Reuses Rsbuild, Rslib, or Rspack configuration.
- Tests run in Node.js, simulated DOMs, and browsers.
- Browser Mode covers Chromium, Firefox, and WebKit.
- Supports sharding and coverage thresholds for CI.
Against
- Quick start requires Node.js 20.19.0 or newer.
- The project recommends using Node.js LTS.
- Browser Mode uses Playwright.
The verdict
Rstest offers a broad set of JavaScript and TypeScript testing environments and CI capabilities while fitting into the Rsbuild and Rspack ecosystem. Check the Node.js requirement before adopting its quick start.
Who it suits
Rstest suits JavaScript and TypeScript developers who want to reuse Rsbuild, Rslib, or Rspack configuration for testing. Teams using browser tests, Module Federation, or CI workflows may find its listed environment and scaling support relevant.
Plans and prices
Free and open source
MIT license · JavaScript/TypeScript testing framework
Read 30 Sep 2026 · rstest.rs
On the record
- Browser support
- Browser Mode uses Playwright and can run tests in Chromium, Firefox, and WebKit.rstest.rs · read 30 Sep 2026
- Build integration
- Rstest can reuse Rsbuild, Rslib, or Rspack configuration, including aliases, transforms, and plugins.rstest.rs · read 30 Sep 2026
- CI scaling
- It supports multi-project testing, test sharding, blob report merging, and coverage thresholds for CI workflows.rstest.rs · read 30 Sep 2026
- Editor integration
- The Rstack VS Code extension lets users browse, run, and debug Rstest tests inside VS Code.rstest.rs · read 30 Sep 2026
- End-to-end testing
- The @rstest/playwright integration runs E2E tests against local, preview, or deployed URLs.rstest.rs · read 30 Sep 2026
- Execution model
- It bundles tests through Rspack's dependency-graph-based build pipeline and uses SWC transforms.rstest.rs · read 30 Sep 2026
- License
- Rstest is free and open source software released under the MIT license.rstest.rs · read 30 Sep 2026
- Module Federation
- Rstest can load real Module Federation remotes in Node, JSDOM, and Browser Mode tests through @module-federation/rstest.rstest.rs · read 30 Sep 2026
- Purpose
- Rstest is a JavaScript and TypeScript testing framework built on Rsbuild and Rspack.rstest.rs · read 30 Sep 2026
- Runtime requirement
- The quick start requires Node.js version 20.19.0 or newer and recommends the Node.js LTS version.rstest.rs · read 30 Sep 2026
- Test environments
- It runs tests in Node.js, simulated DOM environments using jsdom or happy-dom, and real browsers.rstest.rs · read 30 Sep 2026
- Testing features
- Built-in capabilities include Jest-compatible assertions, snapshots, mocks, spies, file-level isolation, lifecycle hooks, reporters, and test filtering.rstest.rs · read 30 Sep 2026