/** * Result of a golden fixture comparison. */ export interface GoldenFixtureResult { /** True if the actual output matches the expected output (or if a new fixture was written). */ pass: boolean; /** True if a new fixture file was created or an existing one was updated. */ wrote: boolean; /** The actual output that was compared (after scrubbing). */ actual: unknown; /** The expected output (loaded from the fixture file), if it existed. */ expected?: unknown; /** Human-readable message describing the result. */ message: string; /** The path to the fixture file. */ fixturePath: string; } /** * Options for matching golden fixtures. */ export interface GoldenFixtureOptions { /** * If true, creates the fixture if it doesn't exist or updates it if it differs. * Defaults to checking UPDATE_FIXTURES or WRITE_FIXTURES environment variables. */ update?: boolean; /** * Optional function to scrub or transform the data before comparison. * Useful for removing dynamic fields like timestamps or IDs. */ scrub?: (data: any) => any; /** * List of keys to mask with a placeholder (e.g., ["planId", "createdAt"]). * If provided, a default recursive scrubber is used to replace these values. */ mask?: string[]; /** * If true, includes a default set of Graphenix-specific masks: * planId, createdAt, compiledAt, sourcePath, and any key ending in "Hash". */ graphenixMasks?: boolean; } /** * Default Graphenix-specific keys to mask. */ export declare const DEFAULT_GRAPHENIX_MASKS: string[]; /** * Recursively masks keys in an object. */ export declare function maskKeys(data: any, keys: string[]): any; /** * Compares the actual object against a "golden" fixture file on disk. * * This utility is designed for the "authoring stage" to help users understand * the structure of the documents they are generating. It supports masking * dynamic fields (like timestamps and IDs) to ensure stable comparisons. */ export declare function matchGoldenFixture(actualInput: unknown, fixturePath: string, options?: GoldenFixtureOptions): GoldenFixtureResult; /** * Asserts that the actual object matches the golden fixture at the given path. * Throws an assertion error if it doesn't match and update is not enabled. */ export declare function assertGoldenFixture(actual: unknown, fixturePath: string, options?: GoldenFixtureOptions): void; //# sourceMappingURL=test-utils.d.ts.map