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

Function checkNode

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

Source from the content-addressed store, hash-verified

762 const missedExpectations: string[] = [];
763
764 function checkNode(node: Element, expectedNode: NodeContent) {
765 const actualTextContent = node.textContent!.trim();
766 const expectedTextContent = expectedNode[expectedNode.length - 1];
767 if (actualTextContent !== expectedTextContent) {
768 missedExpectations.push(
769 `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`,
770 );
771 }
772 }
773
774 function checkLevel(node: Element, expectedNode: NodeContent) {
775 const rawLevel = (node as HTMLElement).style.paddingLeft;

Callers 1

expectFlatTreeToMatchFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected