@amiceli/vitest-cucumber
Version:
vitest tools to use Gherkin feature in unit tests
18 lines (17 loc) • 477 B
TypeScript
import type { Step } from '../../parser/models/step';
import type { CallbackWithParamsAndContext, CallbackWithSingleContext } from '../types';
export type CompiledPattern = {
regex: RegExp;
originalPattern: string;
};
export type ScenarioSteps = {
key: string;
fn: CallbackWithSingleContext | CallbackWithParamsAndContext;
step: Step;
params: unknown[];
compiledPattern?: CompiledPattern;
};
export type StepMap = [
string,
ScenarioSteps
];