cypress-terminal-report
Version:
Better terminal and file output for cypress test logs.
34 lines (33 loc) • 1.15 kB
TypeScript
import CONSTANTS from './constants';
export type ValueOf<T> = T[keyof T];
export type SetOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export type Severity = ValueOf<typeof CONSTANTS.SEVERITY>;
export type LogType = ValueOf<typeof CONSTANTS.LOG_TYPES>;
export type LogSymbols = ValueOf<typeof CONSTANTS.LOG_SYMBOLS> | ValueOf<typeof CONSTANTS.LOG_SYMBOLS_BASIC> | '-';
export type LogOccurrence = ValueOf<typeof CONSTANTS.LOG_OCCURRENCE>;
export type Colors = ValueOf<typeof CONSTANTS.COLORS>;
export type State = ValueOf<typeof CONSTANTS.STATE>;
export type CommandTimings = ValueOf<typeof CONSTANTS.COMMAND_TIMINGS>;
export type BuiltinOutputProcessorsTypes = 'txt' | 'json' | 'html';
export type Log = {
type: LogType;
message: string;
severity: Severity;
timeString?: string;
};
export type MessageData = {
spec: string;
test: string;
state: State;
messages: Log[];
consoleTitle?: string;
level?: number;
isHook?: boolean;
continuous?: boolean;
};
export type TestData = {
mochaRunnable: Mocha.Runnable;
testState?: string;
testTitle: string;
testLevel: number;
};