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

Function checkNodeContent

src/material/tree/tree-using-tree-control.spec.ts:807–815  ·  view source on GitHub ↗
(node: Element, expectedNode: NodeContent)

Source from the content-addressed store, hash-verified

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

Callers 1

expectNestedTreeToMatchFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected