Where do I put hooks? #1170
Unanswered
Benjamin-Re
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi @Benjamin-Re, you can place hooks in the same place / files as you would place step definitions. In the future though, I might want to support hooks defined in |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use badeball's Before hook from inside /support but i get the following error
Expected to find a global registry (this usually means you are trying to define steps or hooks in support/e2e.js, which is not supported) (this might be a bug, please report at https://github.com/badeball/cypress-cucumber-preprocessor)
I tried to put the hook in different support files like index.ts but it is the same error. So where do I put a hook?
For context - I want to get the tags from the feature files to add them to the report. I found that they're all in an environment variable '__cypress_cucumber_preprocessor_dont_use_this_spec' but as the name suggests I shouldn't use it. I suspect that the pickle object of the Before hook could hold that information as well.
Beta Was this translation helpful? Give feedback.
All reactions