MCPcopy Index your code
hub / github.com/angular/components / constructor

Method constructor

src/cdk/testing/component-harness.ts:608–622  ·  view source on GitHub ↗
(
    public harnessType: ComponentHarnessConstructor<T>,
    options: BaseHarnessFilters,
  )

Source from the content-addressed store, hash-verified

606 private _ancestor: string;
607
608 constructor(
609 public harnessType: ComponentHarnessConstructor<T>,
610 options: BaseHarnessFilters,
611 ) {
612 this._ancestor = options.ancestor || '';
613 if (this._ancestor) {
614 this._descriptions.push(`has ancestor matching selector "${this._ancestor}"`);
615 }
616 const selector = options.selector;
617 if (selector !== undefined) {
618 this.add(`host matches selector "${selector}"`, async item => {
619 return (await item.host()).matchesSelector(selector);
620 });
621 }
622 }
623
624 /**
625 * Checks if the specified nullable string value matches the given pattern.

Callers

nothing calls this directly

Calls 3

addMethod · 0.95
pushMethod · 0.65
matchesSelectorMethod · 0.65

Tested by

no test coverage detected