import type { SlowtestBlock } from '../../../domain.objects/SlowtestBlock'; /** * .what = flat test result from jest/vitest * .why = common interface for hierarchy reconstruction */ export interface FlatTestResult { /** ancestor titles from describe blocks (e.g., ["given: x", "when: y"]) */ ancestorTitles: string[]; /** test title (e.g., "then: z" or "it should work") */ title: string; /** test duration in ms */ duration: number; } /** * .what = parse block type and name from title * .why = extracts "given:", "when:", "describe:" prefix */ export declare const parseBlockTitle: (input: { title: string; }) => { type: 'given' | 'when' | 'describe'; name: string; }; /** * .what = check if title is a test (then block) * .why = distinguishes leaf tests from describe blocks */ export declare const isTestTitle: (input: { title: string; }) => boolean; /** * .what = reconstruct nested block hierarchy from flat test results * .why = jest and vitest provide flat results; we need hierarchy for report */ export declare const buildBlockHierarchy: (input: { tests: FlatTestResult[]; }) => SlowtestBlock[]; /** * .what = enrich hierarchy with actual block durations from reporter * .why = jest provides per-describe durations we can use instead of summed */ export declare const enrichBlockDurations: (input: { blocks: SlowtestBlock[]; durations: Map; }) => SlowtestBlock[];