File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -410,23 +410,23 @@ class Test extends AsyncResource {
410410
411411 matchesTestNamePatterns ( ) {
412412 let patterns ;
413- let boolOp = 0 ;
413+ let bool = true ;
414414 if ( testNamePatterns !== null ) {
415415 patterns = testNamePatterns ;
416416 } else if ( testSkipPatterns !== null ) {
417417 patterns = testSkipPatterns ;
418- boolOp = 1 ;
418+ bool = false ;
419419 } else return true ; // Nothing is specified, just continue
420420
421421 const matchesByNameOrParent = ArrayPrototypeSome ( patterns , ( re ) =>
422422 RegExpPrototypeExec ( re , this . name ) !== null ,
423423 ) ||
424424 this . parent ?. matchesTestNamePatterns ( ) ;
425425
426- if ( matchesByNameOrParent ) return ! ! boolOp ; // true
426+ if ( matchesByNameOrParent ) return bool ;
427427
428428 const testNameWithAncestors = StringPrototypeTrim ( this . getTestNameWithAncestors ( ) ) ;
429- if ( ! testNameWithAncestors ) return ! boolOp ; // false
429+ if ( ! testNameWithAncestors ) return ! bool ;
430430
431431 return ArrayPrototypeSome ( patterns , ( re ) => RegExpPrototypeExec ( re , testNameWithAncestors ) !== null ) ;
432432 }
You can’t perform that action at this time.
0 commit comments