interface QUnitResult

The run summary the browser-side runtime publishes on window.QUNIT_RESULT.

const result: QUnitResult =
  { totalTests: 8, finishedTests: 7, failedTests: 1, currentTest: 'Cart: checkout' };
result.finishedTests < result.totalTests; // true — the run stalled inside `currentTest`

Properties

totalTests: number

Tests QUnit registered for this run.

Tests that reached testEnd; short of totalTests means the run stalled.

Tests with at least one failing assertion.

currentTest: string | null

Name of the test in flight, or null when none is running — the stall diagnostic.

Usage

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