MCPcopy Create free account
hub / github.com/angular/components / checkNode

Function checkNode

src/cdk/tree/tree.spec.ts:1658–1666  ·  view source on GitHub ↗
(node: Element, expectedNode: any[])

Source from the content-addressed store, hash-verified

1656 const missedExpectations: string[] = [];
1657
1658 function checkNode(node: Element, expectedNode: any[]) {
1659 const actualTextContent = node.textContent!.trim();
1660 const expectedTextContent = expectedNode[expectedNode.length - 1];
1661 if (actualTextContent !== expectedTextContent) {
1662 missedExpectations.push(
1663 `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`,
1664 );
1665 }
1666 }
1667
1668 function checkLevel(node: Element, expectedNode: any[]) {
1669 const rawLevel = (node as HTMLElement).style.paddingLeft;

Callers 1

expectFlatTreeToMatchFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected