Skip to main content

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​

PropertyTypeDescription
configBettererConfigThe config of the context.
lastSuiteBettererSuiteSummaryThe BettererSuiteSummary for the last test suite run by a context.
suitesBettererSuiteSummariesThe BettererSuiteSummaries for all test suite runs completed by a context.