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.2.tar.gz (4.8 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.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rjest_install-0.1.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rjest_install-0.1.2.tar.gz
Algorithm Hash digest
SHA256 34841573f4fde0cdcc2c993ab795547c19b1cac8b94fd71e98e288430659f8d4
MD5 133269f7364c80640e844bd7b6670b6e
BLAKE2b-256 2c58f0badee1b292d5736eb52b9f63ef03b4ccdf609e9ebd5ce414c2c7c08b89

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjest_install-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rjest_install-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0368c4ef3c6a2173cc588b85fb8a14a05be5cc60947a6d7875aaa4e681b65606
MD5 f605ff4d98e70ea4a153721e04def6bb
BLAKE2b-256 7c6203952b2669cb9299364ae8829d93608048d496eb544bb259159ec173d7eb

See more details on using hashes here.

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