Skip to content

Streaming and Caching

Wallaby provides real-time test feedback through result streaming and cached results. These features deliver immediate test results, coverage, and errors as you code, especially beneficial for larger projects.

Key capabilities

  • Real‑time result streaming: test results, coverage, logs, and errors appear as they become available, without waiting for the entire suite to finish
  • Instant startup with cached results: previous test results display immediately on startup, then reconcile in the background
  • Smart prioritized execution: open files and their related tests run first; edits during a run re-queue only affected tests
  • Progress indicators and time estimates: track execution progress and estimated completion time

No configuration is required. Your existing Wallaby setup works without changes.

Result streaming

Result streaming delivers test results, coverage, logs, and errors as soon as they become available. Results appear incrementally in the Overview panel and Side View.

Prioritized execution

Test files are executed in priority order:

  • Open test files and source files run first
  • Failing tests and tests related to recently edited files are prioritized

This ensures relevant feedback appears first.

Benefits

  • Faster iteration: see affected test results immediately after editing code
  • Long-running suites: view progress and time estimates in the Status tab
  • Minimal disruption: edits during a run re-queue only affected tests; unaffected tests continue executing and already-streamed results remain visible

Cached results

Cached results display the last known execution results immediately on startup for unchanged test files and their dependent source files. Tests are then re-executed in the background to verify they’re still valid.

Benefits

  • Immediate visibility: see coverage, logs, and test status from the previous session instantly
  • Efficient startups: ideal for switching between projects or restarting your editor
  • Background verification: cached data is automatically refreshed with updates reflected in real-time
  • Full‑project awareness: instantly see status and coverage for the entire suite, even when working on a single file

Try it out

To experience result streaming and cached results, clone the demo repository:

Terminal window
git clone https://github.com/wallabyjs/wallaby-v3-demo
cd wallaby-v3-demo
npm ci

Then, install and start Wallaby in your preferred editor. For Standalone Mode, run npm install -g @wallabyjs/cli && wallaby.

Suggestions to try

  • Result Streaming: Open src/common.js, ./test/snail.test.js, and ./test/car.test.js simultaneously. Change the value returned by the helloWorld function in common.js. You’ll see the faster test (./test/car.test.js) update first, followed by the slower test (./test/snail.test.js).

  • Cached Results: Stop Wallaby, then open ./test/snail.test.js and restart Wallaby without making changes. Coverage indicators with previous results appear instantly, and test results update in the Side View’s Tests and Coverage tabs. See the comments at the top of snail.test.js for more scenarios.