Skip to content
rjest
intermediate 15 minutes

Speed up your CI test stage with rjest

The test stage is often the longest step in CI. This guide keeps the daemon warm within a job and persists the transform cache between runs so later invocations skip Jest startup.

  1. 1

    Install rjest in the job

    Add rjest to your install step alongside your other dev dependencies.

    $ npm install -D rjest-install
  2. 2

    Warm the daemon early

    Run the suite once early in the job. This boots jestd and populates the transform cache.

    $ npx rjest --runInBand
  3. 3

    Persist the transform cache

    Cache the rjest sled store between CI runs so cold starts on fresh runners reuse prior transforms. Use your CI's cache action keyed on lockfile hash.

  4. 4

    Emit structured results

    Use --json to feed results into your CI reporting without scraping ANSI output.

    $ npx rjest --json > rjest-results.json

Why this works

  • Most Jest time is fixed startup, not assertions. Warming the daemon once amortizes it across every later invocation in the job.
  • The transform cache is content-addressed by blake3, so restoring it on a new runner is always safe.

More guides in the index, or read the architecture to understand what the daemon is doing.