jasmine-bamboo-reporter
Version:
A reporter for Jasmine which produces a report compatible with Atlassian Bamboo Mocha Test Parser.
58 lines (56 loc) • 1.38 kB
text/typescript
interface ReporterOptions {
/** Path of the JSON report file to write. Defaults to `jasmine.json`. */
file?: string;
/** Pretty-print the JSON output. Defaults to `true`. */
beautify?: boolean;
/** Indentation width used when `beautify` is enabled. Defaults to `4`. */
indentationLevel?: number;
}
interface FailedExpectation {
message: string;
}
interface SpecResult {
status: string;
fullName: string;
description: string;
failedExpectations: FailedExpectation[];
}
interface SpecEntry {
duration: number;
time: number;
title: string;
fullTitle: string;
error?: string;
}
interface Stats {
suites: number;
tests: number;
passes: number;
pending: number;
failures: number;
start: number | Date;
end: number | Date;
duration: number;
time: number;
}
interface Report {
stats: Stats;
failures: SpecEntry[];
passes: SpecEntry[];
skipped: SpecEntry[];
start?: unknown;
}
declare class Reporter {
private options;
private spec;
private specStart;
private output;
constructor(opts?: ReporterOptions);
suiteDone(): void;
specStarted(): void;
specDone(result: SpecResult): void;
jasmineStarted(): void;
mergeOutput(previous: Report): void;
jasmineDone(): void;
}
export { type ReporterOptions, Reporter as default };