BettererContextSummary
API > @betterer/betterer > BettererContextSummary
The summary of a set of test suite runs.
Signature
export interface BettererContextSummary
Remarks
You can get the BettererContextSummary via the BettererReporter interface.
Example 1
const myReporter: BettererReporter = {
// Access the summary after the context has ended:
contextEnd (contextSummary: BettererContextSummary) {
// ...
}
}
or by using BettererReporter's Promise-based lifecycle interface:
Example 2
const myReporter: BettererReporter = {
// Access the summary after the context has ended:
contextStart (context: BettererContext, lifecycle: Promise<BettererContextSummary>) {
const summary: BettererContextSummary = await lifecycle;
// ...
}
}
Properties
| Property | Type | Description |
|---|---|---|
| config | BettererConfig | The config of the context. |
| lastSuite | BettererSuiteSummary | The BettererSuiteSummary for the last test suite run by a context. |
| suites | BettererSuiteSummaries | The BettererSuiteSummaries for all test suite runs completed by a context. |