import { type Assertion } from "vitest";
import { type Lix, openLix } from "../../lix/open-lix.js";
import { cacheMissSimulation } from "./cache-miss-simulation.js";
import { outOfOrderSequenceSimulation } from "./out-of-order-sequence-simulation.js";
import { engineBoundarySimulation } from "./engine-boundary-simulation.js";
export type SimulationTestDef = {
    name: string;
    setup: (lix: Lix, baseline?: Lix) => Promise<Lix>;
};
/**
 * Normal simulation - Standard test execution without any modifications.
 */
declare const normalSimulation: SimulationTestDef;
/**
 * Options for configuring simulation tests
 */
type SimulationTestOptions = {
    /**
     * Array of simulations to run. If not specified, runs default simulations (normal, cache-miss, engine-boundary).
     */
    simulations?: SimulationTestDef[];
    /**
     * Optional timeout passed to each generated Vitest test case.
     */
    timeout?: number;
};
export declare const defaultSimulations: SimulationTestDef[];
export { engineBoundarySimulation, normalSimulation, cacheMissSimulation, outOfOrderSequenceSimulation, };
/**
 * Test utility that runs the same test in different simulations.
 *
 * @param name - Test name
 * @param fn - Test function that receives simulation context
 * @param options - Optional configuration:
 *   - simulations: Array of simulations to run (defaults to normal + cache-miss)
 *
 * @example
 * // Run default simulations (normal, cache-miss)
 * simulationTest("my test", async ({ openSimulatedLix, expectDeterministic }) => {
 *   const lix = await openSimulatedLix({});
 *   // test code - expectDeterministic ensures values match across simulations
 * });
 *
 * @example
 * // Run only normal simulation
 * simulationTest("my test", async ({ openSimulatedLix, expectDeterministic }) => {
 *   const lix = await openSimulatedLix({});
 *   // test code
 * }, { simulations: [normalSimulation] });
 *
 * @example
 * // Run custom simulations including out-of-order
 * simulationTest("my test", async ({ openSimulatedLix, expectDeterministic }) => {
 *   const lix = await openSimulatedLix({});
 *   // test code - but be careful with expectDeterministic if using out-of-order!
 * }, { simulations: [cacheMissSimulation, outOfOrderSequenceSimulation] });
 */
/**
 * Enhanced expect function for simulation tests that verifies values are identical across simulations.
 *
 * @param actual - The value to test
 * @param diffCallback - Optional callback that receives both actual and expected values when they differ.
 *                       This is useful for debugging simulation differences by allowing you to inspect
 *                       and log detailed differences between simulation results before the test fails.
 *                       The callback is only invoked when values actually differ between simulations,
 *                       allowing you to leave debugging code in place without cluttering output when
 *                       tests are passing.
 * @returns Standard expect assertion object
 *
 * @example
 * expectDeterministic(cacheContents, ({ actual, expected }) => {
 *   console.log(`Cache has ${actual.length} vs ${expected.length} entries`);
 *   // Custom diff logic to help debug why simulations differ
 * });
 */
interface ExpectDeterministic {
    <T>(actual: T, diffCallback?: (args: {
        actual: T;
        expected: T;
    }) => void): Assertion<T>;
}
export declare function simulationTest(name: string, fn: (args: {
    simulation: SimulationTestDef;
    openSimulatedLix: typeof openLix;
    expectDeterministic: ExpectDeterministic;
}) => Promise<void>, options?: SimulationTestOptions): void;
//# sourceMappingURL=simulation-test.d.ts.map