Contributions
There are no clear documentation how to rewrite test hooks on cucumber 7
I can't use old code I wrote for testhooks, and there are no clear documentation how to handle it in version7 steps/globalHooks.ts:150:1 - error TS2769: No overload matches this call. Overload 1 of 3, '(tags: string, code: TestCaseHookFunction): void', gave the following error. Argument of type '{ tags: string; }' is not assignable to parameter of type 'string'. Overload 2 of 3, '(options: IDefineTestCaseHookOptions, code: TestCaseHookFunction): void', gave the following error. Argument of type '() => string' is not assignable to parameter of type 'TestCaseHookFunction'. Type '() => string' is not assignable to type 'TestCaseHookFunctionWithoutParameter'. Type 'string' is not assignable to type 'void | Promise'. 150 Before({tags: "@only_morning_run"}, function () { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 151 const now = new Date(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... 155 } ~~~~~ 156 }); ~~4 years agoPlace CucumberStudioCucumberStudio1.2KViews0likes0Comments