Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understanding jest-environment-jsdom #11025

Closed
bidoubiwa opened this issue Jan 25, 2021 · 6 comments
Closed

Understanding jest-environment-jsdom #11025

bidoubiwa opened this issue Jan 25, 2021 · 6 comments
Labels

Comments

@bidoubiwa
Copy link

馃挰 Questions and Help

Hello, I was wondering what exactly jest-environment-jsdom is used for. I use it since apparently its version 25 uses a previous version of js-dom that still supports node 10. But why do I have to use this library instead of a previous version of js-dom?

I see that there is 10m downloads on npm but no readme.

I imagine, if I have to suppose, that it is usefull because jsdom is a sub-dependency and so unless using a yarn.lock to force the sub-dependency to a certain version (which is useless if your project is a library) this library creates an environment that uses a previous version of jsdom.

If this is correct, I would gladly create the README.md in this dir /packages/jest-environment-jsdom as I think it is a really important package that fixes a lot of compatibility issue. It would help a lot of user finding a solution to their failing test, in a period like now for example, where support for node 10 is removed.

Please note that this issue tracker is not a help forum and this issue will be closed.

For questions or help please see:

@ahnpnl
Copy link
Contributor

ahnpnl commented Jan 25, 2021

Hi, you should ask in Jest Discord, you will get help easier there

bors bot added a commit to meilisearch/meilisearch-js that referenced this issue Jan 25, 2021
768: Fix failing test by using an older version of jsdom r=bidoubiwa a=bidoubiwa

Usage of `jest-environment-jsdom` is not explicitly given anywhere I searched for it. But it appears it creates a jest environment that uses (depending on the version) a previous `jsdom`.

More information on my supposition here: jestjs/jest#11025

Npm package of jest-environment-jsdom with 10million downloads a week but no readme  https://www.npmjs.com/package/jest-environment-jsdom 馃く

Co-authored-by: Charlotte Vermandel <charlottevermandel@gmail.com>
@bidoubiwa
Copy link
Author

bidoubiwa commented Jan 25, 2021

Hey @ahnpnl, thanks for answering. I looked at the source code and now I'm sure it is used to have an env with a jsdom version used in a previous version of jest.

I still think it is a good idea to add a README as it saved my tests failing in node 10 and other users might have the same issue. Is that a contribution you consider accepting?

linked issue that could be solved by knowing this package:

@ahnpnl
Copy link
Contributor

ahnpnl commented Jan 25, 2021

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions
Copy link

github-actions bot commented May 6, 2022

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants