You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cucumber-js api reference for BeforeStep and AfterStep indicates that one can use async functions as the function parameter to BeforeStep and AfterStep, just like Before/After and BeforeAll/AfterAll (API reference). However, when attempting to use an async function as an argument to AfterStep, I got the following typescript linting error: Promise returned in function argument where a void return was expected
After doing some poking around, of the three hook types, the TestStepHookFunction type only allows for a return type of void, whereas the other two types, TestStepHookFunction and TestStepFunction have the following return types: any | Promise<any> (code).
✅ What did you expect to see?
I expected that TestStepHookFunction, TestStepHookFunction, and TestStepFunction all had the return type of any | Promise<any>.
👓 What did you see?
The cucumber-js api reference for BeforeStep and AfterStep indicates that one can use async functions as the function parameter to BeforeStep and AfterStep, just like Before/After and BeforeAll/AfterAll (API reference). However, when attempting to use an async function as an argument to AfterStep, I got the following typescript linting error:
Promise returned in function argument where a void return was expected
After doing some poking around, of the three hook types, the
TestStepHookFunction
type only allows for a return type of void, whereas the other two types,TestStepHookFunction
andTestStepFunction
have the following return types:any | Promise<any>
(code).✅ What did you expect to see?
I expected that
TestStepHookFunction
,TestStepHookFunction
, andTestStepFunction
all had the return type ofany | Promise<any>
.📦 Which tool/library version are you using?
Cucumber-js version: 7.3.2
Typescript version: 4.6.3
eslint: 8.12.0
🔬 How could we reproduce it?
Steps to reproduce the behavior:
Promise returned in function argument where a void return was expected
📚 Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.
The text was updated successfully, but these errors were encountered: