(node: Element, expectedNode: any[])
| 1357 | const missedExpectations: string[] = []; |
| 1358 | |
| 1359 | function checkNode(node: Element, expectedNode: any[]) { |
| 1360 | const actualTextContent = node.textContent!.trim(); |
| 1361 | const expectedTextContent = expectedNode[expectedNode.length - 1]; |
| 1362 | if (actualTextContent !== expectedTextContent) { |
| 1363 | missedExpectations.push( |
| 1364 | `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`, |
| 1365 | ); |
| 1366 | } |
| 1367 | } |
| 1368 | |
| 1369 | function checkLevel(node: Element, expectedNode: any[]) { |
| 1370 | const rawLevel = (node as HTMLElement).style.paddingLeft; |
no test coverage detected
searching dependent graphs…