Adds BeforeAll and AfterAll to cucumber types

This commit is contained in:
Asbjørn Dyhrberg Thegler
2017-11-20 11:50:35 +01:00
parent a4c2d3c7de
commit 85382afe95
+5
View File
@@ -50,6 +50,7 @@ export interface HookScenarioResult {
}
export type HookCode = (this: World, scenario: HookScenarioResult, callback?: CallbackStepDefinition) => void;
export type GlobalHookCode = (callback?: CallbackStepDefinition) => void;
// tslint:disable-next-line ban-types
export type AroundCode = (scenario: HookScenarioResult, runScenario?: (error: string, callback?: Function) => void) => void;
@@ -68,8 +69,12 @@ export interface HookOptions {
export interface Hooks {
Before(code: HookCode): void;
Before(options: HookOptions, code: HookCode): void;
BeforeAll(code: GlobalHookCode): void;
BeforeAll(options: HookOptions, code: GlobalHookCode): void;
After(code: HookCode): void;
After(options: HookOptions, code: HookCode): void;
AfterAll(code: GlobalHookCode): void;
AfterAll(options: HookOptions, code: GlobalHookCode): void;
Around(code: AroundCode): void;
setDefaultTimeout(time: number): void;
// tslint:disable-next-line ban-types