-
-
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
import jest functions instead of having globals #5192
Comments
@apflieger, I find that VSCode works fine if you install the Jest typings. |
I couldn't find a way to make it work in IntelliJ |
Duplicate of #4473 |
IDE compatibility is pretty good if you use typings from either flow or typescript |
It's also not convenient because it breaks standardjs.
But I like to think that, if a linter complies, it's because it's a bad practise. And indeed everything in global is a bad practise, at the root of some evils. Mocha supports it. Any plan to add it ? |
We have some vague plans to support it, but nothing concrete at this point. It is a feature we want, though 🙂 |
This will be available in the next version of Jest via #9801. |
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. |
Feature request or documentation missing?
I'd like to do
The current behaviour with globals works but it's just not convenient because IDEs don't recognize the functions.
Here are some stackoverflow related to this:
https://stackoverflow.com/questions/41324636/how-to-import-jest/43964557#43964557
https://stackoverflow.com/questions/41143700/how-to-import-describe-expect-and-it-into-a-typescript-tests-for-ide-to-n
The text was updated successfully, but these errors were encountered: