UNPKG

@firfi/quint-connect

Version:

Model-based testing framework connecting Quint specifications to TypeScript implementations

63 lines 2.88 kB
import { Effect, Schema } from "effect"; import type { QuintError, QuintNotFoundError, RunOptions } from "../cli/quint.js"; import type { Config, Driver, PartialActionMap, StateComparator } from "../driver/types.js"; import type { ItfTrace } from "../itf/schema.js"; declare const StateMismatchError_base: Schema.TaggedErrorClass<StateMismatchError, "StateMismatchError", { readonly _tag: Schema.tag<"StateMismatchError">; } & { message: typeof Schema.String; traceIndex: typeof Schema.Number; stepIndex: typeof Schema.Number; expected: typeof Schema.Unknown; actual: typeof Schema.Unknown; showDiff: Schema.optionalWith<typeof Schema.Boolean, { default: () => true; }>; }>; export declare class StateMismatchError extends StateMismatchError_base { } declare const TraceReplayError_base: Schema.TaggedErrorClass<TraceReplayError, "TraceReplayError", { readonly _tag: Schema.tag<"TraceReplayError">; } & { message: typeof Schema.String; traceIndex: typeof Schema.Number; stepIndex: typeof Schema.Number; action: typeof Schema.String; cause: Schema.optional<typeof Schema.Unknown>; }>; export declare class TraceReplayError extends TraceReplayError_base { } declare const NoTracesError_base: Schema.TaggedErrorClass<NoTracesError, "NoTracesError", { readonly _tag: Schema.tag<"NoTracesError">; } & { message: typeof Schema.String; }>; export declare class NoTracesError extends NoTracesError_base { } /** @internal */ export declare const stripMetadata: (state: { readonly [key: string]: unknown; }) => { readonly [key: string]: unknown; }; /** @internal */ export declare const jsonReplacer: (_: string, v: unknown) => unknown; /** @internal */ export declare const replayTrace: <S, E, R, Actions extends PartialActionMap<E, R>>(trace: ItfTrace, traceIndex: number, driver: Driver<S, E, R, Actions>, config: Config, stateCheck: StateCheck<S> | undefined, seed: string) => Effect.Effect<void, E | StateMismatchError | TraceReplayError, R>; export interface StateCheck<S> { readonly compareState: StateComparator<S>; readonly deserializeState: (raw: unknown) => Effect.Effect<S>; } export type QuintRunOptions<S, E, R, Actions extends PartialActionMap<E, R> = PartialActionMap<E, R>> = RunOptions & { readonly driverFactory: { readonly create: () => Effect.Effect<Driver<S, E, R, Actions>, E, R>; }; readonly stateCheck?: StateCheck<S> | undefined; readonly concurrency?: number | undefined; }; export declare const quintRun: <S, E, R, Actions extends PartialActionMap<E, R> = PartialActionMap<E, R>>(opts: QuintRunOptions<S, E, R, Actions>) => Effect.Effect<{ readonly tracesReplayed: number; readonly seed: string; }, E | QuintError | QuintNotFoundError | StateMismatchError | TraceReplayError | NoTracesError, R>; export {}; //# sourceMappingURL=runner.d.ts.map