/** * .what = registry and stack for repeatably context lookup * .why = enables explicit context lookup by describe path instead of implicit global */ /** * .what = get current describe path as lookup key * .why = used by then/useBeforeAll to find their repeatably context */ export declare const getDescribePath: () => string; /** * .what = state shape for repeatably context * .why = tracks success and failure across attempts */ export interface RepeatableState { /** * .what = the criteria for this repeatably block * .why = determines whether skip-on-success applies (SOME) or not (EVERY) */ criteria: 'EVERY' | 'SOME'; /** * .what = whether any prior attempt has passed * .why = used to skip subsequent attempts (only when criteria is SOME) */ anyAttemptPassed: boolean; /** * .what = whether the current attempt has failed * .why = used to determine if this attempt should mark success */ thisAttemptFailed: boolean; /** * .what = which attempt number is active now * .why = used to determine if we should throw on failure (only on final attempt) */ thisAttemptIndex: number; /** * .what = total number of attempts configured * .why = used to determine if current attempt is final */ allAttemptsQuant: number; /** * .what = error encountered in any failed attempt * .why = preserve error to throw on final attempt if all fail */ anyError: Error | null; } /** * .what = registry for repeatably state keyed by describe path * .why = explicit scope — state is looked up by path, not implicit global */ export declare const registryDescribeRepeatable: Map; /** * .what = get current repeatably context * .why = used by then() to find context when describeStack path doesn't match */ export declare const getCurrentRepeatableContext: () => RepeatableState | null; /** * .what = set current repeatably context * .why = called by genDescribeRepeatable and nested describe wrappers */ export declare const setCurrentRepeatableContext: (ctx: RepeatableState | null) => void; /** * .what = find repeatably context via path hierarchy traversal * .why = nested blocks (when inside given.repeatably) need to find parent context * * @example * // registry has: "given: desc, attempt 1" * // path is: "given: desc, attempt 1 > when: test runs" * // returns: state registered at "given: desc, attempt 1" */ export declare const findRepeatableContext: (path: string) => RepeatableState | undefined; /** * .what = wraps describe callback with stack management and context propagation * .why = vitest defers describe callbacks; this ensures describeStack + repeatably context * are correctly tracked at execution time, not registration time */ export declare const wrapDescribeCallback: (input: { name: string; fn: () => void; }) => (() => void);