Test Runners & Slow Tier
Squeal wraps your existing test runners instead of replacing them. You can combine Vitest, node:test, and pytest side-by-side in a single repository.
Vitest
Section titled “Vitest”Vitest projects are discovered automatically from your repository’s Vitest configuration.
Excluding Vitest projects or build-output tests
Section titled “Excluding Vitest projects or build-output tests”Squeal does not cover tests that depend on a build artifact it does not produce (such as an end-to-end suite spawning a compiled bundle) or browser projects requiring external servers. Exclude them explicitly so Squeal never reports false staleness or runs them out of date:
{ "vitest": { "exclude": ["test/e2e/**"], "excludeProjects": ["browser-e2e"] }}Excluded globs and projects are named explicitly in squeal checks, squeal status, and squeal setup --check as not covered.
Note on Vitest’s dependency optimizer
Section titled “Note on Vitest’s dependency optimizer”If your Vitest config enables deps.optimizer, Squeal runs Vitest without the optimizer because pre-bundled optimizer caches can hold stale copies of source files not tracked in a result’s content key. Squeal notes this in status headers.
node:test
Section titled “node:test”Declare one or more node:test projects under nodeTest in squeal.config.json:
{ "nodeTest": [ { "name": "cli", "include": ["test/cli/**/*.test.ts"], "exclude": ["test/cli/manual.test.ts"], "cwd": ".", "argv": ["--import", "tsx"], "env": { "NODE_ENV": "test" } } ]}Key fields:
name(required, unique): project identifier.include(required): worktree-relative globs (relative tocwd).exclude,cwd,node,argv,env: optional overrides.slow: settrueto place every file in this project into the slow tier.prepare: build command run once bysqueal code --basebefore the project’s tests (see Code Quality Gate). The background daemon skips entries that defineprepare.
pytest
Section titled “pytest”Declare Python test projects under pytest:
{ "pytest": [ { "name": "api", "cwd": "services/api", "include": ["tests/**/test_*.py"], "python": ".venv", "args": ["--ds=settings"], "batchSize": 5 } ]}- Squeal locates Python via
python(relative tocwd, defaulting to.venvthen.pdm-python, or an absolute path outside the worktree). It never guesses from an activatedVIRTUAL_ENVor ambientPATH. batchSize(default5) tunes test files per pytest process: higher values amortize startup; lower values isolate session state.
The slow tier
Section titled “The slow tier”Tests that are too heavy to run after every keystroke (integration suites, multi-second fixtures, end-to-end specs) belong in the slow tier via slow.include (globs across any runner) or "slow": true on a nodeTest / pytest entry:
{ "slow": { "include": ["test/integration/**/*.test.ts"], "trigger": "continuous", "quietMs": 3000, "maxWorkers": 2, "maxParallel": 4, "maxLoadPerCpu": 1.0, "maxDeferMs": 600000 }, "stop": { "requireSlowSuite": true, "slowWaitMs": 120000, "maxHolds": 1 }}How slow scheduling behaves
Section titled “How slow scheduling behaves”trigger: "continuous"(default): once an edit’s fast tests finish and no new edit arrives forslow.quietMs(default 3000 ms), slow files start in the background even mid-turn, arriving with the agent’s next tool call.trigger: "idle": slow files wait until the agent pauses (orsqueal run --slowis called).- Load deferral: if one-minute host load per CPU exceeds
slow.maxLoadPerCpu, slow files defer up toslow.maxDeferMsbefore running anyway. - Stop enforcement: with
stop.requireSlowSuite: true, the Stop hook waits up tostop.slowWaitMsfor uncurrent slow files whenever the session edited files, keeping the agent going on a failure or timeout up tostop.maxHoldstimes per turn.
Run or wait for slow files explicitly at any time:
squeal run --slow --wait 60000