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

Function checkNodeContent

src/material/tree/tree.spec.ts:809–817  ·  view source on GitHub ↗
(node: Element, expectedNode: NodeContent)

Source from the content-addressed store, hash-verified

807function expectNestedTreeToMatch(treeElement: Element, ...expectedTree: TreeContent) {
808 const missedExpectations: string[] = [];
809 function checkNodeContent(node: Element, expectedNode: NodeContent) {
810 const expectedTextContent = expectedNode[expectedNode.length - 1];
811 const actualTextContent = node.childNodes.item(0).textContent!.trim();
812 if (actualTextContent !== expectedTextContent) {
813 missedExpectations.push(
814 `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`,
815 );
816 }
817 }
818
819 function checkNodeDescendants(node: Element, expectedNode: NodeContent, currentIndex: number) {
820 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…