MCPcopy Index your code
hub / github.com/angular/components / checkNodeContent

Function checkNodeContent

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

Source from the content-addressed store, hash-verified

1676function 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;

Callers 1

expectNestedTreeToMatchFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…