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

Function harnessLoaderFor

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

* Gets a `HarnessLoader` instance for an element under the root of this `HarnessEnvironment`. * @param selector The selector for the root element. * @return A `HarnessLoader` rooted at the first element matching the given selector. * @throws If no matching element is found for the given sel

(selector: string)

Source from the content-addressed store, hash-verified

195 * @throws If no matching element is found for the given selector.
196 */
197 async harnessLoaderFor(selector: string): Promise<HarnessLoader> {
198 return this.createEnvironment(
199 await _assertResultFound(this.getAllRawElements(selector), [
200 _getDescriptionForHarnessLoaderQuery(selector),
201 ]),
202 );
203 }
204
205 /**
206 * Gets a `HarnessLoader` instance for an element under the root of this `HarnessEnvironment`.

Callers

nothing calls this directly

Calls 4

_assertResultFoundFunction · 0.85
createEnvironmentMethod · 0.45
getAllRawElementsMethod · 0.45

Tested by

no test coverage detected