File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ class Runner extends EventEmitter {
113113		} 
114114
115115		if  ( metadata . type  ===  'test'  &&  this . match . length  >  0 )  { 
116- 			metadata . exclusive  =  title   !==   null   &&   matcher ( [ title ] ,  this . match ) . length  ===  1 ; 
116+ 			metadata . exclusive  =  matcher ( [ title   ||   '' ] ,  this . match ) . length  ===  1 ; 
117117		} 
118118
119119		const  validationError  =  validateTest ( title ,  fn ,  metadata ) ; 
Original file line number Diff line number Diff line change @@ -711,6 +711,32 @@ test('options.match overrides .only', t => {
711711	} ) ; 
712712} ) ; 
713713
714+ test ( 'options.match includes anonymous tests in negative matches' ,  t  =>  { 
715+ 	t . plan ( 4 ) ; 
716+ 
717+ 	const  runner  =  new  Runner ( { 
718+ 		match : [ '!*oo' ] 
719+ 	} ) ; 
720+ 
721+ 	runner . chain . test ( 'foo' ,  a  =>  { 
722+ 		t . fail ( ) ; 
723+ 		a . pass ( ) ; 
724+ 	} ) ; 
725+ 
726+ 	runner . chain . test ( a  =>  { 
727+ 		t . pass ( ) ; 
728+ 		a . pass ( ) ; 
729+ 	} ) ; 
730+ 
731+ 	runner . run ( { } ) . then ( ( )  =>  { 
732+ 		const  stats  =  runner . buildStats ( ) ; 
733+ 		t . is ( stats . skipCount ,  0 ) ; 
734+ 		t . is ( stats . passCount ,  1 ) ; 
735+ 		t . is ( stats . testCount ,  1 ) ; 
736+ 		t . end ( ) ; 
737+ 	} ) ; 
738+ } ) ; 
739+ 
714740test ( 'macros: Additional args will be spread as additional args on implementation function' ,  t  =>  { 
715741	t . plan ( 3 ) ; 
716742
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments