rjest-install
v0.1.2
Published
A fast Jest-compatible test runner written in Rust
Maintainers
Readme
rjest-install
A blazing-fast, drop-in replacement for Jest. Install via npm and run your tests in ~14ms on warm runs — 100x faster than standard Jest.
rjest-install is the official npm distribution of rjest, a Rust-based test runner that keeps a background daemon (jestd) alive across invocations. It reads your existing jest.config.* files with zero configuration changes and supports the same CLI flags you already use (--watch, --coverage, --runInBand, --testNamePattern, --json, --machine).
Why rjest?
- 100x faster warm runs — 14ms vs 1.4s on typical TypeScript projects
- Zero config — reads
jest.config.js,jest.config.ts, orpackage.jsonJest settings automatically - Drop-in replacement — same CLI flags, test syntax, matchers, and snapshot format
- Built for AI agents — structured JSON and
--machineoutput for fast feedback loops - Persistent caching — SWC transforms cached on disk via
sled; survive restarts
Installation
npm install -D rjest-installRequires Node.js 16+ and a Rust binary (downloaded automatically on first run).
Quick Start
# Run all tests (daemon starts automatically)
npx rjest
# Watch mode
npx rjest --watch
# Coverage
npx rjest --coverage
# Filter by test name
npx rjest --testNamePattern="add"
# Structured JSON output for CI / AI agents
npx rjest --json
npx rjest --machineHow It Works
- Daemon (
jestd) — a Rust process that runs in the background, parsing Jest config once, building a dependency graph, and pre-warming Node.js workers. - SWC Transforms — TypeScript/JSX is compiled natively in Rust and cached by content hash (blake3). No Babel or
ts-jestneeded. - Worker Pool — persistent Node.js processes execute tests in a VM context, avoiding repeated V8 cold-start overhead.
- CLI Shim — forwards commands to the daemon over low-latency IPC (
nng), then renders Jest-style output.
Architecture
┌─────────────┐ IPC (nng) ┌──────────────┐
│ jest CLI │ ◄──────────────► │ jestd │
│ (rjest) │ │ (Rust) │
└─────────────┘ └──────┬───────┘
│
┌──────────────────┼──────────────────┐
│ │ │
┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│ Worker 1│ │ Worker 2│ │ Worker N│
│ (Node) │ │ (Node) │ │ (Node) │
└─────────┘ └─────────┘ └─────────┘Daemon Management
# Check if the daemon is running
npx rjest --daemon-status
# Stop the daemon (caches persist on disk)
npx rjest --daemon-stop
# Force a cold restart
npx rjest --daemon-restartCompatibility
- Node.js: 16+
- Platforms: macOS (Intel & Apple Silicon), Linux (x86_64 & aarch64), Windows (x86_64)
- Config files:
jest.config.js,jest.config.ts,jest.config.mjs,package.json - Matchers:
toBe,toEqual,toThrow,toHaveBeenCalled,resolves,rejects, etc. - Features: snapshots, fake timers,
jest.fn(),jest.mock(), coverage (Istanbul), watch mode
See the compatibility matrix for full details.
Performance
| Metric | rjest | Jest | Speedup | | --- | --- | --- | --- | | Cold start | 1.9s | 1.4s | 0.7x | | Warm run | 14ms | 1.4s | 100x |
AI Agent Usage
# Fast, structured output for automated workflows
npx rjest --onlyChanged --machine
# Filter by test name pattern
npx rjest --testNamePattern="authentication" --jsonDocumentation
Contributing
Contributions are welcome! Please open an issue or PR on the main repository.
License
MIT
