-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow context in before hook #1579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes I was thinking about that the other day. I'm not sure why that's not allowed at the moment. We'd have to decide whether to ensure tests still receive a unique context, since they shouldn't modify a shared object. Either we document that as a pitfall, or we require the context that's assigned in |
I've been wanting this too, but should definitely be a new object.
👍 |
That would be great to have a new object. Is |
No, the We just need to make sure that whatever value is assigned to This might mean |
Having |
Yes, but we won't worry about making deep copies of them or anything like that. |
These are the steps of what I understood about the problem
|
The functionality has landed in #1657 but it still needs to be documented. @kugtong33 is awesome and on the case though! |
It would be useful to have context available in
before
hooks, so that messy workarounds like in #1542 aren't required. It's useful in cases where you're doing integration testing and are downloading several URLs whose content will be used across multiple tests.Without being able to share context in before hooks you would need to resort to the workaround, or download the page for each test each time, even though the content doesn't change between tests.
The text was updated successfully, but these errors were encountered: