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

Function checkIsElement

src/cdk/testing/tests/cross-environment-tests.ts:713–718  ·  view source on GitHub ↗
(result: ComponentHarness | TestElement, selector?: string)

Source from the content-addressed store, hash-verified

711}
712
713export async function checkIsElement(result: ComponentHarness | TestElement, selector?: string) {
714 expect(result instanceof ComponentHarness).toBe(false);
715 if (selector) {
716 expect(await (result as TestElement).matchesSelector(selector)).toBe(true);
717 }
718}
719
720export async function checkIsHarness<T extends ComponentHarness>(
721 result: ComponentHarness | TestElement,

Callers 1

crossEnvironmentSpecsFunction · 0.85

Calls 1

matchesSelectorMethod · 0.65

Tested by

no test coverage detected