UNPKG

@amiceli/vitest-cucumber

Version:

vitest tools to use Gherkin feature in unit tests

30 lines (29 loc) 1.42 kB
import type { RequiredDescribeFeatureOptions } from '../../vitest/describe-feature'; import type { Background } from './Background'; import { type Example, Scenario, ScenarioOutline } from './scenario'; import { Taggable } from './Taggable'; export declare abstract class ScenarioParent extends Taggable { readonly name: string; private readonly _scenarii; background: Background | null; protected readonly title: string; protected constructor(name: string, title: string); addScenario(newScenario: Scenario | ScenarioOutline): void; getScenarioByName(name: string): Scenario | ScenarioOutline | undefined; getScenarioExample(name: string): Example | null; getFirstNotCalledScenario(options: RequiredDescribeFeatureOptions): Scenario | ScenarioOutline | undefined; haveAlreadyCalledScenario(): boolean; getTitle(): string; checkUncalledScenario(options: RequiredDescribeFeatureOptions): this; checkUncalledBackground(options: RequiredDescribeFeatureOptions): this; getBackground(): Background; private checkIfScenarioExists; private scenarioShouldNotBeOutline; private scenarioShouldBeOutline; getScenario(description: string): Scenario; getScenarioOutline(description: string): ScenarioOutline; mustHaveScenario(): void; get hasScenarioOutline(): boolean; get hasScenario(): boolean; get scenarii(): Readonly<Scenario[]>; }