(node: Element, expectedNode: NodeContent)
| 807 | function expectNestedTreeToMatch(treeElement: Element, ...expectedTree: TreeContent) { |
| 808 | const missedExpectations: string[] = []; |
| 809 | function checkNodeContent(node: Element, expectedNode: NodeContent) { |
| 810 | const expectedTextContent = expectedNode[expectedNode.length - 1]; |
| 811 | const actualTextContent = node.childNodes.item(0).textContent!.trim(); |
| 812 | if (actualTextContent !== expectedTextContent) { |
| 813 | missedExpectations.push( |
| 814 | `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`, |
| 815 | ); |
| 816 | } |
| 817 | } |
| 818 | |
| 819 | function checkNodeDescendants(node: Element, expectedNode: NodeContent, currentIndex: number) { |
| 820 | let expectedDescendant = 0; |
no test coverage detected
searching dependent graphs…