@firfi/quint-connect
Version:
Model-based testing framework connecting Quint specifications to TypeScript implementations
31 lines • 2.84 kB
TypeScript
import { Effect } from "effect";
import type { QuintError, QuintNotFoundError, RunOptions, TestGenerationOptions } from "../cli/quint.js";
import { TraceGeneration } from "../cli/trace-generation.js";
import type { ActionMap, Config, Driver } from "../driver/types.js";
import type { ItfTrace } from "../itf/schema.js";
import { jsonReplacer, NoTracesError, StateMismatchError, TraceReplayError } from "./replay-errors.js";
import type { StateCheck } from "./state-check.js";
import { stripMetadata } from "./trace-state.js";
export { jsonReplacer, NoTracesError, StateMismatchError, stripMetadata, TraceReplayError };
export type { StateCheck } from "./state-check.js";
/** @internal */
export declare const replayTrace: <S, E, R, Actions extends ActionMap<E, R>, StateE = never, StateR = never>(trace: ItfTrace, traceIndex: number, driver: Driver<S, E, R, Actions>, config: Config, stateCheck: StateCheck<S, StateE, StateR> | undefined, seed: string) => Effect.Effect<void, E | StateMismatchError | TraceReplayError, R | StateR>;
interface QuintReplayOptions<S, E, R, Actions extends ActionMap<E, R> = ActionMap<E, R>, StateE = never, StateR = never> {
readonly driverFactory: {
readonly create: () => Effect.Effect<Driver<S, E, R, Actions>, E, R>;
};
readonly stateCheck?: StateCheck<S, StateE, StateR> | undefined;
readonly concurrency?: number | undefined;
}
export type QuintRunOptions<S, E, R, Actions extends ActionMap<E, R> = ActionMap<E, R>, StateE = never, StateR = never> = RunOptions & QuintReplayOptions<S, E, R, Actions, StateE, StateR>;
export type QuintTestOptions<S, E, R, Actions extends ActionMap<E, R> = ActionMap<E, R>, StateE = never, StateR = never> = TestGenerationOptions & QuintReplayOptions<S, E, R, Actions, StateE, StateR>;
export type QuintGenerationOptions<S, E, R, Actions extends ActionMap<E, R> = ActionMap<E, R>, StateE = never, StateR = never> = QuintRunOptions<S, E, R, Actions, StateE, StateR> | QuintTestOptions<S, E, R, Actions, StateE, StateR>;
export declare const quintRunWithTraceGeneration: <S, E, R, Actions extends ActionMap<E, R> = ActionMap<E, R>, StateE = never, StateR = never>(opts: QuintGenerationOptions<S, E, R, Actions, StateE, StateR>) => Effect.Effect<{
readonly tracesReplayed: number;
readonly seed: string;
}, E | QuintError | QuintNotFoundError | StateMismatchError | TraceReplayError | NoTracesError, R | StateR | TraceGeneration>;
export declare const quintRun: <S, E, R, Actions extends ActionMap<E, R> = ActionMap<E, R>, StateE = never, StateR = never>(opts: QuintGenerationOptions<S, E, R, Actions, StateE, StateR>) => Effect.Effect<{
readonly tracesReplayed: number;
readonly seed: string;
}, E | QuintError | QuintNotFoundError | StateMismatchError | TraceReplayError | NoTracesError, R | StateR>;
//# sourceMappingURL=runner.d.ts.map