@@ -609,7 +609,16 @@ export class HarnessPredicate<T extends ComponentHarness> {
609609 public harnessType : ComponentHarnessConstructor < T > ,
610610 options : BaseHarnessFilters ,
611611 ) {
612- this . _addBaseOptions ( options ) ;
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+ }
613622 }
614623
615624 /**
@@ -714,20 +723,6 @@ export class HarnessPredicate<T extends ComponentHarness> {
714723
715724 return result . join ( ', ' ) ;
716725 }
717-
718- /** Adds base options common to all harness types. */
719- private _addBaseOptions ( options : BaseHarnessFilters ) {
720- this . _ancestor = options . ancestor || '' ;
721- if ( this . _ancestor ) {
722- this . _descriptions . push ( `has ancestor matching selector "${ this . _ancestor } "` ) ;
723- }
724- const selector = options . selector ;
725- if ( selector !== undefined ) {
726- this . add ( `host matches selector "${ selector } "` , async item => {
727- return ( await item . host ( ) ) . matchesSelector ( selector ) ;
728- } ) ;
729- }
730- }
731726}
732727
733728/** Represent a value as a string for the purpose of logging. */
0 commit comments