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
A test will fails and throw ReferenceError: SVGElement is not defined when calling isVisible() on an SVG element.
Expected behaviour
Can correctly verify if an SVG Element is visible.
Actual behaviour
Throws an error when verifying if an SVG Element is visible.
Possible Solution
The issue was introduced here with the purpose to make isVisible more comprehensive. This was ported from jest-dom as it is declared on the function comment but looking at js-dom repository they don't have instanceof SVGElement but, instead instanceof window.SVGElement which makes sense. Also, I have tried this fix and it worked so I will open PR with this suggested change and let you guys decide.
The text was updated successfully, but these errors were encountered:
Subject of the issue
A test will fails and throw
ReferenceError: SVGElement is not defined
when callingisVisible()
on an SVG element.Expected behaviour
Can correctly verify if an SVG Element is visible.
Actual behaviour
Throws an error when verifying if an SVG Element is visible.
Possible Solution
The issue was introduced here with the purpose to make
isVisible
more comprehensive. This was ported from jest-dom as it is declared on the function comment but looking at js-dom repository they don't haveinstanceof SVGElement
but, insteadinstanceof window.SVGElement
which makes sense. Also, I have tried this fix and it worked so I will open PR with this suggested change and let you guys decide.The text was updated successfully, but these errors were encountered: