(node: Element, expectedNode: any[])
| 1676 | function expectNestedTreeToMatch(treeElement: Element, ...expectedTree: any[]) { |
| 1677 | const missedExpectations: string[] = []; |
| 1678 | function checkNodeContent(node: Element, expectedNode: any[]) { |
| 1679 | const expectedTextContent = expectedNode[expectedNode.length - 1]; |
| 1680 | const actualTextContent = node.childNodes.item(0).textContent!.trim(); |
| 1681 | if (actualTextContent !== expectedTextContent) { |
| 1682 | missedExpectations.push( |
| 1683 | `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`, |
| 1684 | ); |
| 1685 | } |
| 1686 | } |
| 1687 | |
| 1688 | function checkNodeDescendants(node: Element, expectedNode: any[], currentIndex: number) { |
| 1689 | let expectedDescendant = 0; |
no test coverage detected
searching dependent graphs…