@amiceli/vitest-cucumber
Version:
vitest tools to use Gherkin feature in unit tests
17 lines (16 loc) • 925 B
TypeScript
import { type Background, type Scenario, type StepTypes } from '../../parser/models';
import type { CallbackWithParamsAndContext, CallbackWithSingleContext } from '../types';
import type { ScenarioSteps } from './types';
export declare function defineSharedStep(type: StepTypes, name: string, scenarioStepCallback: ScenarioSteps['fn']): ScenarioSteps;
export declare function defineStepToTest(options: {
stepType: string;
parent: Scenario | Background;
stepDetails: string;
scenarioStepCallback: CallbackWithSingleContext | CallbackWithParamsAndContext;
}): ScenarioSteps;
export declare function updatePredefinedStepsAccordingLevel(steps: {
globallyPredefinedSteps: ScenarioSteps[];
featurePredefinedSteps: ScenarioSteps[];
rulePredefinedSteps: ScenarioSteps[];
}): ScenarioSteps[];
export declare function orderStepsToRun(parent: Scenario | Background, steps: ScenarioSteps[]): ScenarioSteps[];