BettererReporter.contextStart()
API > @betterer/betterer > BettererReporter > contextStart
The contextStart() hook is called when a BettererContext starts. The lifecycle promise will resolve when the context ends or reject when the context throws an error, so it can be used instead of the BettererReporter.contextEnd() and BettererReporter.contextError() hooks.
Signature
contextStart?(context: BettererContext, lifecycle: Promise<BettererContextSummary>): Promise<void> | void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| context | BettererContext | The test context. |
| lifecycle | Promise<BettererContextSummary> | A promise that resolves when the context ends and rejects when the context throws. |
Returns
Promise<void> | void