Skip to content

Commit 7e58f3d

Browse files
authored
Remove global hook tags (#135)
1 parent 2c5da11 commit 7e58f3d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cucumber-tsflow/src/hook-decorators.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {IDefineTestCaseHookOptions} from '@cucumber/cucumber/lib/support_code_library_builder/types';
1+
import type {IDefineTestCaseHookOptions, IDefineTestRunHookOptions} from '@cucumber/cucumber/lib/support_code_library_builder/types';
22
import { BindingRegistry } from "./binding-registry";
33
import { Callsite } from "./our-callsite";
44
import { StepBinding, StepBindingFlags } from "./step-binding";
@@ -72,18 +72,18 @@ export function after(tagOrOption?: string | HookOptions): MethodDecorator {
7272
* A method decorator that marks the associated function as a 'Before Scenario' step. The function is
7373
* executed before each scenario.
7474
*
75-
* @param tagOrOption An optional tag or hook options object.
75+
* @param options Optional hook options object.
7676
*/
77-
export function beforeAll(tagOrOption?: string | HookOptions): MethodDecorator {
78-
return createHookDecorator(StepBindingFlags.beforeAll, tagOrOption);
77+
export function beforeAll(options?: IDefineTestRunHookOptions): MethodDecorator {
78+
return createHookDecorator(StepBindingFlags.beforeAll, options);
7979
}
8080

8181
/**
8282
* A method decorator that marks the associated function as an 'After Scenario' step. The function is
8383
* executed after each scenario.
8484
*
85-
* @param tagOrOption An optional tag or hook options object.
85+
* @param options Optional hook options object.
8686
*/
87-
export function afterAll(tagOrOption?: string | HookOptions): MethodDecorator {
88-
return createHookDecorator(StepBindingFlags.afterAll, tagOrOption);
87+
export function afterAll(options?: IDefineTestRunHookOptions): MethodDecorator {
88+
return createHookDecorator(StepBindingFlags.afterAll, options);
8989
}

0 commit comments

Comments
 (0)