UNPKG

mocha-multiple-sessions-detailed-runner

Version:
33 lines (28 loc) 989 B
import type { SessionMeta, SessionState } from '../core/types'; export interface ISessionMetaRepository { // Basic CRUD save(sessionMeta: SessionMeta): void; findByLabel(label: string): SessionMeta | null; findAll(): SessionMeta[]; delete(label: string): boolean; clear(): void; exists(label: string): boolean; // State management updateState(label: string, state: Partial<SessionState>): void; getStates(): Record<string, SessionState>; markAsRunning(label: string): void; markAsCompleted(label: string, result: any): void; markAsFailed(label: string, error: Error): void; // Queries getByStatus(status: SessionState['status']): SessionMeta[]; getExecutionSummary(): ExecutionSummary; } export interface ExecutionSummary { totalSessions: number; readySessions: number; runningSessions: number; completedSessions: number; failedSessions: number; lastExecutionTime?: Date; totalExecutionTime?: number; }