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

Function checkNodeContent

src/cdk/tree/tree-with-tree-control.spec.ts:1394–1402  ·  view source on GitHub ↗
(node: Element, expectedNode: any[])

Source from the content-addressed store, hash-verified

1392function expectNestedTreeToMatch(treeElement: Element, ...expectedTree: any[]) {
1393 const missedExpectations: string[] = [];
1394 function checkNodeContent(node: Element, expectedNode: any[]) {
1395 const expectedTextContent = expectedNode[expectedNode.length - 1];
1396 const actualTextContent = node.childNodes.item(0).textContent!.trim();
1397 if (actualTextContent !== expectedTextContent) {
1398 missedExpectations.push(
1399 `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`,
1400 );
1401 }
1402 }
1403
1404 function checkNodeDescendants(node: Element, expectedNode: any[], currentIndex: number) {
1405 let expectedDescendant = 0;

Callers 1

expectNestedTreeToMatchFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected