Functions

f
armJSCoverage(
page: Page,
config: Config,
log?: (...args: unknown[]) => void
): Promise<boolean>

Arms V8 line coverage on the page before navigation, returning whether it started. resetOnNavigation: false keeps the data across the goto below, so the bundle's execution is captured. Chromium-only — run.ts already disables coverage for firefox/webkit, and page.coverage exists only on chromium pages.

f
buildAllGroupBundles(groupConfigs: Config[]): Promise<void>

Builds all concurrent group bundles with a single esbuild invocation.

f
buildTestBundle(config: Config): Promise<void>

Pre-builds the esbuild bundle for all test files and caches the result in the group's build state.

f
bundleCacheKey(
opts: esbuild.BuildOptions,
files: string[]
): string

Cache key for the daemon/watch incremental esbuild context. Single source of truth for what makes two builds interchangeable: file set + every BuildOption that varies between runs. Items intentionally NOT keyed: plugins (daemon shuts down on package.json mtime change; the prepended qunitxRuntimePlugin is static and deterministic), nodePaths (cwd-bound, daemon stays in cwd), and the hardcoded literals (bundle, keepNames, legalComments, jsx, sourcemap, footer, logLevel). When adding a new variable BuildOption, extend this function — that is the contract enforced by the unit suite.

f
deriveBuildErrorType(error: unknown): string

Derives a human-readable error category from an esbuild BuildFailure or a generic Error. Inspects the first structured esbuild message when available; falls back to string heuristics.

f
flushConsoleHandlers(
handlers?: Set<Promise<void>> | null,
page?: Page | null,
deadline?
): Promise<void>

Awaits all in-flight console handler promises until the Set is stably empty, recursing to catch handlers added by Firefox BiDi events that arrive during each await. The deadline (default 2 s) guards against infinite recursion.

f
formatBuildErrors(error: unknown): string

Formats esbuild BuildFailure messages into clean human-readable text (no ANSI codes). When given a structured BuildFailure, each error is formatted with its file location and a caret line. Falls back to stripping ANSI codes from the error's string representation.

f
reconcileUndeliveredResults(
counter: Counter,
result: QUnitResult
): number

Reconciles the Node-side counter with QUnit's authoritative in-page tally after a run finishes, for a single-group run. Returns how many finished results the WebSocket stream failed to deliver (0 on a clean run).

f
run(
config: Config,
connections: Connections,
targetTestFilesToFilter?: string[] | null
): Promise<Connections | undefined>

Runs the esbuild-bundled tests inside a Playwright-controlled browser page and streams TAP output.

Type Aliases

T
BrowserRunOutcome =
{ kind: "completed"; }
| { kind: "empty"; }
| { kind: "no-tests-ran"; }
| { kind: "stalled"; }

How a browser run ended, decided from QUnit's tally plus whether a WS done arrived.