forked from Arthy000/gherkin-testcafe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
27 lines (22 loc) · 1.05 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { TableDefinition } from 'cucumber';
import testcafe, { t } from 'testcafe';
export * from 'testcafe';
export default testcafe;
declare module 'cucumber' {
export type HookFunction = (testController: typeof t) => Promise<void>;
export type GlobalHookFunction = (fixtureContext: { [key: string]: string }) => Promise<void>;
export function After(code: HookFunction): void;
export function After(options: string, code: HookFunction): void;
export function AfterAll(code: GlobalHookFunction): void;
export function Before(code: HookFunction): void;
export function Before(options: string, code: HookFunction): void;
export function BeforeAll(code: GlobalHookFunction): void;
export type StepFunction = (
testController: typeof t,
parameters: any[],
dataTable: TableDefinition | null
) => Promise<void>;
export function Given(pattern: RegExp | string, code: StepFunction): void;
export function When(pattern: RegExp | string, code: StepFunction): void;
export function Then(pattern: RegExp | string, code: StepFunction): void;
}