-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
🤔 What's the problem you're trying to solve?
Currently, to determine whether a hook is a Before/After hook, we use code that looks similar to the following:
let isAfterHook = false;
for (const step of testCase) {
isAfterHook = isAfterHook || step.stepDefinitionId != null;
// Do more reporting
}While this works, it doesn't have the ability to accurately format BeforeAll/BeforeStep/AfterAll/AfterStep hooks. Some of the reports we generate can be a bit misleading as a result.
✨ What's your proposed solution?
Ideally, Cucumber would pass the type parameter on @cucumber/messages.Hook to the formatter so that we can determine the exact type of hook that was run.
⛏ Have you considered any alternatives or workarounds?
No response
📚 Any additional context?
I believe this parameter was added after @cucumber/messages@v24, which is probably why it isn't already being sent.
Metadata
Metadata
Assignees
Labels
No labels