interface Counter

Running totals of test outcomes for a single test run. Mutated in place as TAP events arrive from the browser.

const counter: Counter =
  { total: 3, failed: 1, skipped: 0, todo: 0, passed: 2, assertionsFailed: 0 };
counter.total; // 3 — the sum of the pass/fail/skip/todo buckets

Properties

total: number

Total number of test cases registered.

failed: number

Number of test cases that had at least one failing assertion.

skipped: number

Number of test cases explicitly marked as skipped (not run).

todo: number

Number of test cases marked as todo (expected to fail, work in progress).

passed: number

Number of test cases where every assertion passed.

Number of test cases that threw an unexpected error outside of assertions.

Usage

import { type Counter } from "lib/types.ts";