Skip to main content

A fast Jest-compatible test runner written in Rust

Project description

rjest-install

PyPI version License: MIT CI

A blazing-fast, drop-in replacement for Jest. Install via pip and run your tests in ~14ms on warm runs — 100x faster than standard Jest.

rjest-install is the official PyPI 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, or package.json Jest settings automatically
  • Drop-in replacement — same CLI flags, test syntax, matchers, and snapshot format
  • Built for AI agents — structured JSON and --machine output for fast feedback loops
  • Persistent caching — SWC transforms cached on disk via sled; survive restarts

Installation

pip install rjest-install

Requires Python 3.8+ and a Rust binary (downloaded automatically on first run, or install via cargo / Homebrew).

Quick Start

# Run all tests (daemon starts automatically)
jest

# Watch mode
jest --watch

# Coverage
jest --coverage

# Filter by test name
jest --testNamePattern="add"

# Structured JSON output for CI / AI agents
jest --json
jest --machine

How It Works

  1. Daemon (jestd) — a Rust process that runs in the background, parsing Jest config once, building a dependency graph, and pre-warming Node.js workers.
  2. SWC Transforms — TypeScript/JSX is compiled natively in Rust and cached by content hash (blake3). No Babel or ts-jest needed.
  3. Worker Pool — persistent Node.js processes execute tests in a VM context, avoiding repeated V8 cold-start overhead.
  4. 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
jest --daemon-status

# Stop the daemon (caches persist on disk)
jest --daemon-stop

# Force a cold restart
jest --daemon-restart

Compatibility

  • Python: 3.8+
  • Node.js: 16+ (for running tests)
  • 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
jest --onlyChanged --machine

# Filter by test name pattern
jest --testNamePattern="authentication" --json

Other Installation Methods

  • npm: npm install -D rjest-install
  • Homebrew: brew tap neul-labs/tap && brew install rjest
  • Cargo: cargo install rjest

Documentation

Contributing

Contributions are welcome! Please open an issue or PR on the main repository.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rjest_install-0.1.3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rjest_install-0.1.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file rjest_install-0.1.3.tar.gz.

File metadata

  • Download URL: rjest_install-0.1.3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rjest_install-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b72eb0e2311c2171a1edaaf21abbcce71361a277a35f6805a7221160ee63c7c9
MD5 1a4253b3d62a334bfe4b42fa5dcd276a
BLAKE2b-256 8ba8a9b0875e35272b53f5d1a584d8d478735307704d5ec7b0a046fff47cf239

See more details on using hashes here.

Provenance

The following attestation bundles were made for rjest_install-0.1.3.tar.gz:

Publisher: release.yml on neul-labs/rjest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rjest_install-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: rjest_install-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rjest_install-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 78518e15e2fd86fa67d72b24be7014616949080fdd50ec3624ee21911d993f62
MD5 634a825831696a54d34dc0de920a0a05
BLAKE2b-256 fc0782d4fb73d4473b950dd777c593575ad08a19b018b9367c1873bec0fc7b4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rjest_install-0.1.3-py3-none-any.whl:

Publisher: release.yml on neul-labs/rjest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page