DefinitelyTyped/types/jest-cucumber-fusion/index.d.ts
Pelle Johnsen 93d70f87d5
Add jest-cucumber-fusion (#43487)
* Add jest-cucumber-fusion

* Add 'declare module'

* Add support for Gherkin tables

* Fix failing tests for jest-cucumber-fusion

- Set minimum ts version

- Fix linting errors
2020-04-01 12:45:48 -07:00

21 lines
1.0 KiB
TypeScript

// Type definitions for jest-cucumber-fusion 0.6
// Project: https://github.com/b-yond-infinite-network/jest-cucumber-fusion#readme
// Definitions by: Pelle Johnsen <https://github.com/pjoe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.4
import { loadFeature } from 'jest-cucumber';
export type CallBack = (...args: ReadonlyArray<string | Array<Record<string, string>>>) => void | Promise<void>;
export function Given(name: string | RegExp, callback: CallBack): void;
export function When(name: string | RegExp, callback: CallBack): void;
export function Then(name: string | RegExp, callback: CallBack): void;
export function And(name: string | RegExp, callback: CallBack): void;
export function But(name: string | RegExp, callback: CallBack): void;
export function Before(callback: () => void | Promise<void>): void;
export function After(callback: () => void | Promise<void>): void;
export function Fusion(feature: string, options?: Parameters<typeof loadFeature>[1]): void;