UNPKG

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

Version:

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

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