You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How has this issue affected you? What are you trying to accomplish?
Testing Library users have been having issues like testing-library/user-event#391 which are caused by bugs in JSDOM that have since been fixed in newer versions. This could theoretically affect any project running Jest tests that rely on JSDOM though (including create-react-app's default configuration).
Suggested fix
For reference, it seems like Jest is currently using JSDOM 12, and in the future will be using JSDOM 16. It would be nice if we could either automatically detect Jest's version of JSDOM or use the latest dynamically via Unpkg/npm. If that's not possible, just upgrading the hard coded version to 12 or 16 should help a lot. I would have tried to do this myself, but JSDOM doesn't seem to release a single bundle file any more.
If you download this and run the test script locally, it will pass because Jest is using a newer version of JSDOM that fixes the bug with the initial values of selectionStart and selectionEnd. This is also the same behavior if you run similar code in a browser.
Your Environment
Software
Name/Version
小odesandbox
latest at the time of issue
Browser
N/A
Operating System
N/A
The text was updated successfully, but these errors were encountered:
This is a good point! Just opened a PR for it, I think the best long term solution would be to indeed dynamically install JSDOM, but with the current version it would create quite a slowdown. That's why we have some preprocessing tied to it right now. I automated that part now though, so it becomes easier to stay up to date.
馃悰 bug report
Description of the problem
It seems like Code sandbox has an old version of JSDOM (4.0.0) hard coded into the bundle: https://github.com/codesandbox/codesandbox-client/pull/1812/files#diff-3fcdeb2de813a974b29d8610b234c7f2R51
How has this issue affected you? What are you trying to accomplish?
Testing Library users have been having issues like testing-library/user-event#391 which are caused by bugs in JSDOM that have since been fixed in newer versions. This could theoretically affect any project running Jest tests that rely on JSDOM though (including create-react-app's default configuration).
Suggested fix
For reference, it seems like Jest is currently using JSDOM 12, and in the future will be using JSDOM 16. It would be nice if we could either automatically detect Jest's version of JSDOM or use the latest dynamically via Unpkg/npm. If that's not possible, just upgrading the hard coded version to 12 or 16 should help a lot. I would have tried to do this myself, but JSDOM doesn't seem to release a single bundle file any more.
Link to sandbox: link
If you download this and run the
test
script locally, it will pass because Jest is using a newer version of JSDOM that fixes the bug with the initial values ofselectionStart
andselectionEnd
. This is also the same behavior if you run similar code in a browser.Your Environment
The text was updated successfully, but these errors were encountered: