Skip to main content

BettererReporter.runStart()

API > @betterer/betterer > BettererReporter > runStart

The runStart() hook is called when a BettererRun starts. The lifecycle promise will resolve when the run ends and reject when the run throws an error, so it can be used instead of the BettererReporter.runEnd() and BettererReporter.runError() hooks.

Signature

runStart?(run: BettererRun, lifecycle: Promise<BettererRunSummary>): Promise<void> | void;

Parameters

ParameterTypeDescription
runBettererRunThe test run.
lifecyclePromise<BettererRunSummary>A promise that resolves when the test run ends and rejects when the test run throws.

Returns

Promise<void> | void