* Verifies that an element contains a single ` ` child element, and returns that child.
(element: SVGElement)
| 27 | * Verifies that an element contains a single `<svg>` child element, and returns that child. |
| 28 | */ |
| 29 | function verifyAndGetSingleSvgChild(element: SVGElement): SVGElement { |
| 30 | expect(element.id).toBeFalsy(); |
| 31 | expect(element.childNodes.length).toBe(1); |
| 32 | const svgChild = element.childNodes[0] as SVGElement; |
| 33 | expect(svgChild.tagName.toLowerCase()).toBe('svg'); |
| 34 | return svgChild; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Verifies that an element contains a single `<path>` child element whose "id" attribute has |