Functions

f
run(config: Config): Promise<RunOutcome>

Runs the whole suite once in headless Chrome and resolves with its RunOutcome.

f
scriptHint(
cwd: string,
file: string,
relativeTo?: (
from: string,
to: string
) => string
): string

The qunitx run <file> line a zero-test run suggests, with forward slashes.

f
watch(config: Config): Promise<WatchSession>

Starts a watch session: one browser, one page, every test file in a single bundle, behind an HTTP server that stays up. Resolves once the initial run has finished and the watchers are armed — the returned WatchSession is how the caller stops it again.

Interfaces

I
RunOutcome

How a one-shot run ended. Everything a caller needs to decide what happens next, and nothing about how it should be announced — run neither writes a summary nor exits.

  • durationMs: number

    Wall-clock duration of the test phase in milliseconds.

  • exitCode: number

    0 when every test passed, 1 for any failure, group rejection, or empty filtered run.

  • finishedAt: number

    Epoch ms when it ended. finishedAt - startedAt is durationMs modulo clock resolution.

  • startedAt: number

    Epoch ms when the test phase began — after the bundle, at the first navigation.

I
WatchSession

A live watch session: the run's browser, server and file watchers, kept open.