-
Notifications
You must be signed in to change notification settings - Fork 410
Closed
Description
-
jest-dom
version: 1.5.1 -
node
version: 8.11.3 -
npm
(oryarn
) version: yarn 1.7.0 -
dom-testing-library
version: 2.7.0 -
react-testing-library
version: 4.1.2
Relevant code or config:
expect(someSvgElement).toHaveClass("any-class");
What you did:
- Make
expect
calls on SVG elements
What happened:
Exception thrown because they are not HTML elements.
Problem description:
Most assertions defined in this library would also be applicable to SVG elements, but they are being blocked unnecessarily.
Suggested solution:
Modify checkHtmlElement
to allow elements that satisfy instanceof SVGElement
.
I'm happy to open a PR if no one opposes.
Metadata
Metadata
Assignees
Labels
No labels