|
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'; |
2 | 2 | import { BindingRegistry } from "./binding-registry"; |
3 | 3 | import { Callsite } from "./our-callsite"; |
4 | 4 | import { StepBinding, StepBindingFlags } from "./step-binding"; |
@@ -72,18 +72,18 @@ export function after(tagOrOption?: string | HookOptions): MethodDecorator { |
72 | 72 | * A method decorator that marks the associated function as a 'Before Scenario' step. The function is |
73 | 73 | * executed before each scenario. |
74 | 74 | * |
75 | | - * @param tagOrOption An optional tag or hook options object. |
| 75 | + * @param options Optional hook options object. |
76 | 76 | */ |
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); |
79 | 79 | } |
80 | 80 |
|
81 | 81 | /** |
82 | 82 | * A method decorator that marks the associated function as an 'After Scenario' step. The function is |
83 | 83 | * executed after each scenario. |
84 | 84 | * |
85 | | - * @param tagOrOption An optional tag or hook options object. |
| 85 | + * @param options Optional hook options object. |
86 | 86 | */ |
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); |
89 | 89 | } |
0 commit comments