import type { TestRunner } from '../../../infra/isomorph.test/detectTestRunner'; /** * .what = the slice of the runner's expect + snapshot state a repeatable attempt reads * .why = a repeatable attempt strips the attempt ordinal from its snapshot key, and on * jest it withholds the snapshot mismatch of a non-final attempt. both reach * runner internals, so the slice is checked once, here, and typed for the rest */ export interface ExpectSnapshotState { /** the runner's global expect, whose state holds the current test name */ expect: { getState: () => Record; setState: (state: Record) => void; }; /** the per-file count of `toMatchSnapshot` calls, keyed by test name */ counters: { get: (name: string) => number | undefined; set: (name: string, count: number) => unknown; }; /** the snapshot file's entries, keyed by `${testName} ${count}` */ snapshotData: object; /** * jest only: the mismatches `toMatchSnapshot` records instead of a throw * .note = null on vitest, whose `toMatchSnapshot` throws */ suppressedErrors: unknown[] | null; /** the raw snapshot state, whose `unmatched` tally a withheld attempt restores */ snapshotState: object; } /** * .what = reads and checks the expect + snapshot state of the active runner * .why = an absent field is a runner change this code must learn of, so it fails * loud rather than silently skip the key strip or the withhold (invariant I4) */ export declare const getOneExpectSnapshotState: (input: { runner: TestRunner; }) => ExpectSnapshotState;