-
-
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
jest.fn() is not a function #4613
Comments
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions. Thank you :) |
@cpojer this is a real issue with documentation, since there's no It is fair to assume that I think documentation needs to be updated. |
Thanks @rickhanlonii now I see there confusion comes from! Some users like me are coming from expect.js, while maintaining some legacy code written with mocha and expect. I still use |
in my case is because in the |
I had the same problem. I migrated from mocha to jest and had in the Throws error: beforeEach('setup delegate.js', () => {
});
// correct for jest
beforeEach(() => {
}); The error:
|
@a1300 your issue is separate (but valid!). 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 If you don't want to send a PR, can you open up a separate issue? |
@SimenB thanks for the information. I will open a separate issue. |
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. |
I'm trying to simulate 'onSubmit' by using jest but it throws an error on 'jest.fn()' saying jest.fn() is not a function but in every example, I see everyone imports jest and uses it. Is this a bug or do I miss something?
The text was updated successfully, but these errors were encountered: