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

Function checkNode

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

Source from the content-addressed store, hash-verified

1645 const missedExpectations: string[] = [];
1646
1647 function checkNode(node: Element, expectedNode: any[]) {
1648 const actualTextContent = node.textContent!.trim();
1649 const expectedTextContent = expectedNode[expectedNode.length - 1];
1650 if (actualTextContent !== expectedTextContent) {
1651 missedExpectations.push(
1652 `Expected node contents to be ${expectedTextContent} but was ${actualTextContent}`,
1653 );
1654 }
1655 }
1656
1657 function checkLevel(node: Element, expectedNode: any[]) {
1658 const rawLevel = (node as HTMLElement).style.paddingLeft;

Callers 1

expectFlatTreeToMatchFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected