import type { Step, ThenStep } from "../Step"; export type GivenScenarioDefinition = { given?: Step; scenario: Step; expect_error?: (this: TContext, error: Error) => void | Promise; }; export type GivenScenarioWhenThenDefinition = { given?: Step; scenario: ScenarioStep; }; export type GivenScenarioTest = | GivenScenarioDefinition | GivenScenarioWhenThenDefinition; export type ScenarioWhenStep = { name?: string; when: Step; then: ThenStep; }; export type ScenarioThenWhenStep = { name?: string; then_when: Step; then: ThenStep; }; export type ScenarioStep = [ ScenarioWhenStep, ...ScenarioThenWhenStep[], ];