UNPKG

@90poe/jest-performant-warnings-stats-reporter

Version:

A flexible jest reporter that provides ability to show statistics of warnings and group them

26 lines (25 loc) 972 B
import { Context, Test } from '@jest/reporters'; import { AggregatedResult, TestResult } from '@jest/test-result'; import { Config } from '@jest/types'; import { IJestReporterConfig } from './types'; declare class CustomReporter { globalConfiguration: Config.InitialOptions; private options; private showWarningSummary; private warningsConfig; private maxSlowTests; private globalConfig; private logs; private showSlowest; private slowTests; private finalTable; private warnOnSlowerThan; constructor(globalConfiguration: Config.InitialOptions, options: IJestReporterConfig); onRunStart({ numTotalTestSuites }: AggregatedResult): void; onTestResult(_: Test, testResult: TestResult): void; onRunComplete(_: Set<Context>, { numFailedTests, numPassedTests, testResults }: AggregatedResult): void; private collectSlowTests; private consoleSlowTests; private calcTestTime; } export default CustomReporter;