property RunResult.status

How the run finished: whether it got through everything it selected, and if not, what stopped it. Distinct from RunResult.ok, which is the verdict — a completed run can be entirely red, and an aborted one can have no failures at all.

A boolean aborted could not tell a suite that stopped at its first failure from one that genuinely has two tests — both come back ok: false with a small counts.total — so the three endings are named instead:

  • completed — every selected test reached an outcome.
  • aborted — something cut it short: session.abort(), the CLI's qq, or a signal. An already-aborted signal lands here too, having launched no browser at all.
  • failFastfailFast was set and a test failed, so the rest of the queue was dropped. Reported whenever the policy ended the run, including when the failure was the last test.

completed is the only one where counts.total is the whole selection. Check it before reporting a red run as red, or a UI says "1 failure" about a suite it never finished.

Type

"completed" | "aborted" | "failFast"

Usage

import { type RunResult } from "lib/api/test.ts";