Remove JSDOM selection API warning
See original GitHub issueCurrently, jest-remirror
will mock some methods from EditView
and print a warning about “Test depends on DOM selection API which is not supported in JSDOM/Node environment”.
In this PR, someone added the implementation of selection API for JSDOM. This feature was shipped with JSDOM v16. So maybe we can remove this warning?
Something that needs to be addressed:
- Does JSDOM really implement all the selection APIs we need?
-
The latest Jest (v25.3.0) is still using JSDOM v15, so we can’t simply remove the mock and the warning from the codebase. We need to provide a way to detect the Jest/JSOM version. (update: Jest v26.0.0 is using JSDOM v16)
This issue is not important and should have a low priority. I just post it as a memo.
Checklist
- I have read the contributing document.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
jsdom/Changelog.md at master - GitHub
This fixes an issue where after upgrading to jsdom v16. 5.0 you would no longer be able to set a global variable named...
Read more >Consider using the "jsdom" test environment - Stack Overflow
In your package.json , or jest.config.js / jest.config.ts file, change the value of the testEnvironment property to jsdom . package.json.
Read more >Element.querySelectorAll() - Web APIs | MDN
The Element method querySelectorAll() returns a static (not live) NodeList representing a list of elements matching the specified group of ...
Read more >Changelog.md - jest-environment-jsdom-fourteen - GitLab
Removed the old jsdom API, as the new API now has all the capabilities ... Fixed CSS selection APIs sometimes returning outdated results, ......
Read more >jest-environment-jsdom | Yarn - Package Manager
... [jest-core] Do not warn about DNSCHANNEL handles when using the --detectOpenHandles option (#11470); [jest-runner] Remove dependency on jest-config ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll close this since it’s been addressed in the
next
branch.Oh wow! Yes you’re right. I completely missed the fact I was doing that in the code. 😅
Haha, I must have been at my computer too long. I’ll update the API in the next refactor in a few days.