-
-
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
Naming the beforeEach function produces imprecise error: fn.call is not a function #6903
Comments
I'll copy parts of my comment from #4613 for others to more easily contribute. Wanna send a PR giving a better error? For Jest Circus the code is here: https://github.com/facebook/jest/blob/c93e02718480b9f25b0d28f33456ed159bd11b69/packages/jest-circus/src/index.js#L42-L48 It's a matter of type-checking that the first argument is indeed a function |
Can you assign me this issue? |
@mohit2872 we already had an open PR when you commented, sorry! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
After migrating from
mocha
tojest
. I got the following error for naming thebeforeEach
function:To Reproduce
Expected behavior
A better error message, that points to the problem:
Link to repl
Link to reproduction.
Result:
The text was updated successfully, but these errors were encountered: