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

Function getHarness

src/cdk/testing/harness-environment.ts:235–237  ·  view source on GitHub ↗

* Searches for an instance of the component corresponding to the given harness type under the * `HarnessEnvironment`'s root element, and returns a `ComponentHarness` for that instance. If * multiple matching components are found, a harness for the first one is returned. If no matching * com

(query: HarnessQuery<T>)

Source from the content-addressed store, hash-verified

233 * @throws If a matching component instance can't be found.
234 */
235 getHarness<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<T> {
236 return this.locatorFor(query)();
237 }
238
239 /**
240 * Searches for an instance of the component corresponding to the given harness type under the

Callers

nothing calls this directly

Calls 1

locatorForMethod · 0.80

Tested by

no test coverage detected