tdpw
Version:
CLI tool for uploading Playwright test reports to TestDino platform with Azure storage support
70 lines • 1.93 kB
TypeScript
import { z } from 'zod';
/**
* Zod schema for validating essential parts of a Playwright JSON report
*/
declare const PlaywrightReportSchema: z.ZodObject<{
config: z.ZodAny;
suites: z.ZodArray<z.ZodAny, "many">;
stats: z.ZodObject<{
startTime: z.ZodString;
duration: z.ZodNumber;
expected: z.ZodNumber;
skipped: z.ZodNumber;
unexpected: z.ZodNumber;
flaky: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
expected: number;
startTime: string;
duration: number;
skipped: number;
unexpected: number;
flaky: number;
}, {
expected: number;
startTime: string;
duration: number;
skipped: number;
unexpected: number;
flaky: number;
}>;
errors: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
metadata: z.ZodOptional<z.ZodAny>;
}, "strip", z.ZodTypeAny, {
suites: any[];
stats: {
expected: number;
startTime: string;
duration: number;
skipped: number;
unexpected: number;
flaky: number;
};
config?: any;
errors?: any[] | undefined;
metadata?: any;
}, {
suites: any[];
stats: {
expected: number;
startTime: string;
duration: number;
skipped: number;
unexpected: number;
flaky: number;
};
config?: any;
errors?: any[] | undefined;
metadata?: any;
}>;
/**
* TypeScript type for a validated Playwright report
*/
export type PlaywrightReport = z.infer<typeof PlaywrightReportSchema>;
/**
* Read, parse, and validate a Playwright JSON report from disk.
* @param jsonPath Absolute path to the Playwright JSON report
* @throws ValidationError if reading, parsing, or validation fails
*/
export declare function parsePlaywrightJson(jsonPath: string): Promise<PlaywrightReport>;
export {};
//# sourceMappingURL=parser.d.ts.map