import type { TestFramework } from '../../services/test-cache/test-cache-service.js'; export declare const FRAMEWORKS: TestFramework[]; /** * Build the argv for the underlying test runner. This is the SINGLE * source of truth for "peaks test drops --no-cache from the * consumer's script" (G7 / NG7). `--cache` is always passed * unless the user explicitly opts in to `--no-cache` or `--passthrough`. */ export declare function buildRunnerArgv(framework: TestFramework, patterns: string[], options: { all?: boolean; changed?: boolean; cache?: boolean; passthrough?: boolean; }): string[]; /** Successful resolution — everything `spawn` needs, plus provenance. */ export type RunnerFound = { ok: true; /** Executable to spawn: node itself, a local shim, or a PATH hit. */ command: string; /** argv for `command` (includes the JS entry when spawning node). */ args: string[]; /** How the runner was found — named in the PATH-fallback notice. */ via: string; /** True only for the PATH fallback, which the caller surfaces visibly. */ fromPath: boolean; }; export type RunnerResolution = RunnerFound | { ok: false; searched: string[]; }; /** Injection seams for tests — production passes nothing. */ export type ResolveRunnerDeps = { platform?: NodeJS.Platform; existsSync?: (path: string) => boolean; readFileSync?: (path: string) => string; env?: NodeJS.ProcessEnv; /** Node executable used to run the runner's JS entry. */ nodeExecPath?: string; }; /** * Resolve the consumer project's LOCAL runner, and the form of it that * `spawn` can actually launch on this platform. * * Probed, in order (every probe is reported when nothing is found): * 1. `/node_modules/.bin/` (+ `.cmd`/`.exe` on Windows) — * the project-local runner the command documents. * 2. `/node_modules//package.json` → its `bin` JS entry. * 3. PATH — last resort only; the caller prints a visible notice. * * Between 1 and 2 the **JS entry** wins: `spawn` runs it as * `node …`, which is identical on Windows and POSIX and never * routes argv through a shell. The `.cmd` shim is only a fallback because * it needs cmd.exe to launch it (see `toSpawnable`). */ export declare function resolveRunner(framework: TestFramework, argv: string[], projectRoot: string, deps?: ResolveRunnerDeps): RunnerResolution; /** Actionable message for the no-runner case — never a raw ENOENT. */ export declare function formatRunnerNotFound(framework: TestFramework, searched: string[]): string;