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

Function checkNode

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

Source from the content-addressed store, hash-verified

1641 const missedExpectations: string[] = [];
1642
1643 function checkNode(node: Element, expectedNode: any[]) {
1644 const actualTextContent = node.textContent!.trim();
1645 const expectedTextContent = expectedNode[expectedNode.length - 1];
1646 if (actualTextContent !== expectedTextContent) {
1647 missedExpectations.push(
1648 `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`,
1649 );
1650 }
1651 }
1652
1653 function checkLevel(node: Element, expectedNode: any[]) {
1654 const rawLevel = (node as HTMLElement).style.paddingLeft;

Callers 1

expectFlatTreeToMatchFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected