-
-
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 needs disclaimers. #15135
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
1 similar comment
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
Page(s)
https://jestjs.io/docs
Description
The architecture of Jest has very significant consequences on what is and isn’t possible to do with Jest tests:
But many people don’t realize this and see Jest as a one-size-fits-all testing solution because it’s so popular. It’s not one-size-fits-all, and this is a poorly communicated fact. Jest needs a top-level disclaimer page that explains these limitations in its docs. The disclaimer should include:
You get PRs like #8708, which seems like something that's clearly contrary to Jest's philosophy, because people started using Jest before realizing how hard it would be to fulfill their needs with it.
There are projects for which Jest’s opinions about strong isolation are beneficial and projects where it isn’t. Most other testing frameworks I’m familiar with provide less test isolation, so they don’t have the limitations I mentioned above, and therefore may be more suitable for some projects.
I had one such project where it was impossible to achieve good performance testing ts-morph transforms with Jest, but my boss at the time was not very open to alternatives that would have saved us time and effort. I tried to persuade him it was by design but he failed to see that strong isolation is central to Jest’s design and not something the maintainers intend to change.
If only I had an official disclaimer from the project itself, I would have been more able to convince him what was in our best interest, and he might not have had such a dogmatic attitude about it to begin with.
The text was updated successfully, but these errors were encountered: