-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: throw on nested test declarations #9828
Conversation
const {asyncError, fn, mode, testName: name, timeout} = event; | ||
|
||
if (currentlyRunningTest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably add this to add_hook
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-Authored-By: Michał Pierzchała <thymikee@gmail.com>
Hmm, this breaks #5964. Might need to back out the hook part, and try to re-land later if FB has migrated their tests. |
Disallowing hooks is kept here: https://github.com/SimenB/jest/tree/disallow-hooks-in-tests for some point in the future when we can land it |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
I love circus, so simple to fix 😀 I reused the error message from Jasmine as it made it easier to write a test for.
Fixes #9824
Fixes #9825
Test plan
E2E test added that passes for both jasmine and circus