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

Function createComponentHarness

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

Creates a `ComponentHarness` for the given harness type with the given raw host element.

(
    harnessType: ComponentHarnessConstructor<T>,
    element: E,
  )

Source from the content-addressed store, hash-verified

331
332 /** Creates a `ComponentHarness` for the given harness type with the given raw host element. */
333 protected createComponentHarness<T extends ComponentHarness>(
334 harnessType: ComponentHarnessConstructor<T>,
335 element: E,
336 ): T {
337 return new harnessType(this.createEnvironment(element));
338 }
339
340 /**
341 * Flushes change detection and async tasks captured in the Angular zone.

Callers

nothing calls this directly

Calls 1

createEnvironmentMethod · 0.45

Tested by

no test coverage detected