* Verifies that an element contains a single ` ` child element whose "id" attribute has * the specified value.
(element: Element, attributeValue: string)
| 39 | * the specified value. |
| 40 | */ |
| 41 | function verifyPathChildElement(element: Element, attributeValue: string): void { |
| 42 | expect(element.childNodes.length).toBe(1); |
| 43 | const pathElement = element.childNodes[0] as SVGPathElement; |
| 44 | expect(pathElement.tagName.toLowerCase()).toBe('path'); |
| 45 | |
| 46 | // The testing data SVGs have the name attribute set for verification. |
| 47 | expect(pathElement.getAttribute('name')).toBe(attributeValue); |
| 48 | } |
| 49 | |
| 50 | /** Creates a test component fixture. */ |
| 51 | function createComponent<T>(component: Type<T>, providers: Provider[] = []) { |
no test coverage detected
searching dependent graphs…