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

Function getHarnessOrNull

src/cdk/testing/component-harness.ts:518–520  ·  view source on GitHub ↗

* Gets the first matching harness for the given query within the current harness's content. * @param query The harness query to search for. * @returns The first harness matching the given query, or null if none is found.

(query: HarnessQuery<T>)

Source from the content-addressed store, hash-verified

516 * @returns The first harness matching the given query, or null if none is found.
517 */
518 async getHarnessOrNull<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T | null> {
519 return (await this.getRootHarnessLoader()).getHarnessOrNull(query);
520 }
521
522 /**
523 * Gets a matching harness for the given query and index within the current harness's content.

Callers

nothing calls this directly

Calls 2

getHarnessOrNullMethod · 0.80
getRootHarnessLoaderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…