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
file:///Users/wkaminski/Desktop/jsdom-test/app.js:6
console.log(element.checkVisibility())
^
TypeError: element.checkVisibility is not a function
at file:///Users/wkaminski/Desktop/jsdom-test/app.js:6:21
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Not sure what should be the behaviour of this method (and if its even possible to implement it in jsdom), but its annoying while testing browser code that rely on this function. I would appreciate some guidance on how to mock this method if adding it to JSDOM is not possible.
Basic info:
Minimal reproduction case
https://stackblitz.com/edit/stackblitz-starters-m39mou?file=index.js,package-lock.json
Hi! currently trying to use "checkVisibility" function results in a exception:
Not sure what should be the behaviour of this method (and if its even possible to implement it in jsdom), but its annoying while testing browser code that rely on this function. I would appreciate some guidance on how to mock this method if adding it to JSDOM is not possible.
How does similar code behave in browsers?
Correctly returns if the element is visible. This method is documented here: https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility
The text was updated successfully, but these errors were encountered: