type alias RunCounts

Outcome totals for a run. total is the sum of the four buckets; assertionsFailed counts individual assertions rather than tests, so one test can contribute several.

The public name for the runner's own Counter — the same object, not a re-shaped copy, so the numbers a reporter reads mid-run and the numbers on the result cannot disagree.

const counts: RunCounts =
  { total: 8, passed: 7, failed: 1, skipped: 0, todo: 0, assertionsFailed: 2 };
counts.passed + counts.failed === counts.total; // true when nothing was skipped

Definition

Usage

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