import { type ParsedTestCounts } from './test-log-parser.js'; /** * Tag NevermoreTestRunnerUtils stamps on the results table a test script * returns. A test place also runs probe scripts (`--script-text`) that return * whatever they like, so results are recognized by this rather than by shape. */ export declare const TEST_RESULTS_FORMAT = "nevermore-test-results@1"; /** One failed test, or one suite that failed before its tests could run. */ export interface StructuredTestFailure { name: string; message?: string; } /** * What a test run says about itself, returned as a value instead of printed. * * Open Cloud truncates a long run's logs, so counts scraped out of that text go * missing on exactly the runs where they matter most. Mirrors the * `TestRunResults` table in `NevermoreTestRunnerUtils`. */ export interface StructuredTestResults { success: boolean; /** False for a smoke test, whose counts are all zero because nothing counted. */ ranJest: boolean; passed: number; failed: number; /** Pending plus todo. */ skipped: number; total: number; suitesPassed: number; suitesFailed: number; suitesTotal: number; /** Capped by the runner; `omittedFailures` says how many did not fit. */ failures: StructuredTestFailure[]; omittedFailures: number; /** Why the run failed when no individual test can say so. */ error?: string; } /** * Decode a single returned value into results, or undefined if it is not one. * * Fields are read defensively rather than trusted: the value crossed a * transport, and the two transports spell exotic Luau types differently, so a * malformed field must not become a verdict. */ export declare function decodeStructuredTestResults(value: unknown): StructuredTestResults | undefined; /** * Find the results a run returned, if it returned any. * * `undefined` covers both "the transport delivered no return channel" and "the * script returned nothing recognizable" — a caller falls back to the logs * either way, which is what a test script written before this convention gets. */ export declare function findStructuredTestResults(returnValues: unknown[] | undefined): StructuredTestResults | undefined; /** * Describe a verdict the run's own counts do not support, for a warning. * * A run reporting failure while nothing in it failed is self-contradicting, and * it is precisely what a runner reading the wrong field produces: the counts * stay plausible, so nothing looks wrong except that every package fails at * once. That shipped once — a runner consulted jest-lua's inverted * `AggregatedResult.success` and failed every passing suite. * * Reported, never corrected. A runner that says it failed may know something its * counts cannot express (an interrupted run, a snapshot check, a reporter * error), so the verdict stands and the contradiction is made loud instead. */ export declare function describeUnexplainedVerdict(results: StructuredTestResults): string | undefined; /** Counts in the shape the reporters already render. */ export declare function toParsedTestCounts(results: StructuredTestResults): ParsedTestCounts; /** * Why the runner says the run failed. Empty when it says it passed. * * Phrased to match the log parser's wording so that merging the two sources * collapses the overlap instead of reporting every failure twice. */ export declare function structuredFailureReasons(results: StructuredTestResults): string[]; //# sourceMappingURL=structured-test-results.d.ts.map