Introduction to Rstest
mainRstest is a JavaScript testing framework powered by Rspack. It provides Jest-compatible APIs while offering native support for modern web technologies like TypeScript, ESM, CJS, and CSS Modules.
Unlike traditional testing frameworks that use a per-file transform-and-execute model, Rstest uses a dependency graph–based bundle model. This allows it to leverage build-time optimizations (like tree-shaking) and ensures that test behavior closely matches production output. It is designed to integrate seamlessly into existing Rspack-based projects or be adopted into non-Rspack projects without requiring a full build system migration.