interface RunSignals

One-shot callbacks wiring the browser's progress back into the run pipeline. Each is installed by the code that awaits it and fired by the web server as the corresponding event arrives.

import * as RunState from './setup/run-state.ts';

const { signals } = RunState.newGroup();
signals.onWsOpen = () => {}; // installed by the code that awaits it, fired by the web server

Properties

testRunDone: (() => void) | null

Resolves when the browser signals that the test run is complete.

resetTestTimeout: (() => void) | null

Resets the inactivity timeout; called on each TAP progress event.

onWsOpen: (() => void) | null

Resolves when the WebSocket connection from the browser page is established.

onTestsJsServed: (() => void) | null

Resolves when the test bundle JS has been served to the browser at least once.

Usage

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