question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove JSDOM selection API warning

See original GitHub issue

Currently, 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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ifiokjrcommented, Jun 9, 2020

I’ll close this since it’s been addressed in the next branch.

1reaction
ifiokjrcommented, May 26, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found