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

Function countHarnesses

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

* Searches for all instance of the component corresponding to the given harness type under the * `HarnessEnvironment`'s root element, and returns the number that were found. * @param query A query for a harness to create * @return The number of instances that were found.

(query: HarnessQuery<T>)

Source from the content-addressed store, hash-verified

289 * @return The number of instances that were found.
290 */
291 async countHarnesses<T extends ComponentHarness>(query: HarnessQuery<T>): Promise<number> {
292 return (await this.locatorForAll(query)()).length;
293 }
294
295 /**
296 * Searches for an instance of the component corresponding to the given harness type under the

Callers

nothing calls this directly

Calls 1

locatorForAllMethod · 0.80

Tested by

no test coverage detected