///
import charm from 'charm';
import { CoverageMap } from 'istanbul-lib-coverage';
import Environment from '../Environment';
import Suite from '../Suite';
import Test from '../Test';
import TextCoverage, { TextCoverageProperties } from './TextCoverage';
import { CoverageMessage, DeprecationMessage } from '../executors/Executor';
import Node, { TunnelMessage } from '../executors/Node';
export default class Pretty extends TextCoverage implements PrettyProperties {
colorReplacement: {
[key: string]: string;
};
dimensions: any;
titleWidth: number;
maxProgressBarWidth: number;
tunnelState: string;
protected _header: string;
protected _log: string[];
protected _reports: any;
protected _spinnerOffset: number;
protected _total: Report;
protected _charm: charm.CharmInstance | undefined;
protected _renderTimeout: NodeJS.Timer | undefined;
constructor(executor: Node, options?: PrettyOptions);
close(): void;
runStart(): void;
runEnd(): void;
coverage(data: CoverageMessage): void;
suiteStart(suite: Suite): void;
suiteEnd(suite: Suite): void;
testEnd(test: Test): void;
tunnelDownloadProgress(message: TunnelMessage): void;
tunnelStatus(message: TunnelMessage): void;
error(error: Error): void;
deprecated(message: DeprecationMessage): void;
private _getReport;
private _newCharm;
private _record;
private _drawProgressBar;
private _drawSessionReport;
private _abbreviateEnvironment;
private _render;
private _drawTotalReport;
private _getColor;
}
export interface PrettyProperties extends TextCoverageProperties {
colorReplacement: {
[key: string]: string;
};
dimensions: any;
maxProgressBarWidth: number;
titleWidth: number;
}
export declare type PrettyOptions = Partial;
export declare class Report {
environment: Environment | undefined;
sessionId: string | undefined;
numTotal: number;
numPassed: number;
numFailed: number;
numSkipped: number;
results: number[];
suiteInfo: {
[id: string]: SuiteInfo;
};
coverageMap: CoverageMap;
constructor(environment?: Environment, sessionId?: string);
get finished(): number;
record(result: Result, count?: number): void;
getCompressedResults(maxWidth: number): number[];
}
export declare enum Result {
PASS = 0,
SKIP = 1,
FAIL = 2
}
export interface SuiteInfo {
parentId: string | undefined;
numToReport: number;
}