MCPcopy
hub / github.com/angular/components / getHarness

Function getHarness

src/cdk/testing/component-harness.ts:509–511  ·  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. * @throws If no matching harness is found.

(query: HarnessQuery<T>)

Source from the content-addressed store, hash-verified

507 * @throws If no matching harness is found.
508 */
509 async getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T> {
510 return (await this.getRootHarnessLoader()).getHarness(query);
511 }
512
513 /**
514 * Gets the first matching harness for the given query within the current harness's content.

Callers

nothing calls this directly

Calls 2

getHarnessMethod · 0.80
getRootHarnessLoaderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…