@amiceli/vitest-cucumber
Version:
vitest tools to use Gherkin feature in unit tests
23 lines (22 loc) • 996 B
TypeScript
import type { RequiredDescribeFeatureOptions } from '../../vitest/describe-feature';
import { type Background, type Scenario } from '.';
import { Rule } from './Rule';
import { ScenarioParent } from './ScenarioParent';
export declare class Feature extends ScenarioParent {
private readonly _rules;
readonly withoutGherkin: boolean;
constructor(name: string, title?: string, withoutGherkin?: boolean);
getRuleByName(name: string): Rule | undefined;
getFirstRuleNotCalled(options: RequiredDescribeFeatureOptions): Rule | undefined;
haveAlreadyCalledRule(): boolean;
checkUncalledRule(options: RequiredDescribeFeatureOptions): this;
checkIfRuleExists(ruleName: string): Rule;
mustHaveScenarioOrRules(): void;
addRule(newRule: Rule): void;
get rules(): Readonly<Rule[]>;
}
export declare class DefineFeature extends Feature {
getBackground(): Background;
getScenario(description: string): Scenario;
checkIfRuleExists(ruleName: string): Rule;
}