Closed gingerchris closed 1 year ago
Can you add a test case please
I am struggling to write a test case that fails prior to this addition, which is frustrating as this is causing tests to fail in my codebase.
This codepen example demonstrates the className
returning an SVGAnimatedString but when I add an svg to the Fixture in the className test it returns the className value specified in the markup.
What's the best way to get help on this? Should I create an issue? Thanks
As noted on MDN, the value of
el.className
might not be as expected whenel
is anSVGElement
. Instead of the expected string, it can be an instance ofSVGAnimatedString
.When this is the case, tests fail with the following error:
This PR instead returns the contents of the element's
class
attribute when the element tagName issvg