UNPKG

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

Version:

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

54 lines (45 loc) 923 B
import { LogEntry } from '@jest/console'; type WarningDataArray = Array<Array<string | number>>; type PrepareWarnings = (arg0: Record<string, number>) => WarningDataArray; type Warning = { name: string; regex: RegExp; files?: Set<unknown>; }; type SlowTest = { duration: number; fullName: string; filePath: string; }; type Log = { filePath: string; warnings: Array<LogEntry>; }; type LogsObj = Record<string, Log>; interface IJestReporterConfig { showSlowest?: boolean; maxSlowTests?: number; warnOnSlowerThan?: number; showWarningSummary?: boolean; warningsConfig?: Array<Warning>; } enum CustomLogType { Log = 'log', Warn = 'warn', Error = 'error', } type CustomLogEntry = { message: string; type: CustomLogType; origin: string; }; export { CustomLogEntry, CustomLogType, IJestReporterConfig, LogsObj, PrepareWarnings, SlowTest, Warning, WarningDataArray, };