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 {
410
410
411
411
matchesTestNamePatterns ( ) {
412
412
let patterns ;
413
- let boolOp = 0 ;
413
+ let bool = true ;
414
414
if ( testNamePatterns !== null ) {
415
415
patterns = testNamePatterns ;
416
416
} else if ( testSkipPatterns !== null ) {
417
417
patterns = testSkipPatterns ;
418
- boolOp = 1 ;
418
+ bool = false ;
419
419
} else return true ; // Nothing is specified, just continue
420
420
421
421
const matchesByNameOrParent = ArrayPrototypeSome ( patterns , ( re ) =>
422
422
RegExpPrototypeExec ( re , this . name ) !== null ,
423
423
) ||
424
424
this . parent ?. matchesTestNamePatterns ( ) ;
425
425
426
- if ( matchesByNameOrParent ) return ! ! boolOp ; // true
426
+ if ( matchesByNameOrParent ) return bool ;
427
427
428
428
const testNameWithAncestors = StringPrototypeTrim ( this . getTestNameWithAncestors ( ) ) ;
429
- if ( ! testNameWithAncestors ) return ! boolOp ; // false
429
+ if ( ! testNameWithAncestors ) return ! bool ;
430
430
431
431
return ArrayPrototypeSome ( patterns , ( re ) => RegExpPrototypeExec ( re , testNameWithAncestors ) !== null ) ;
432
432
}
You can’t perform that action at this time.
0 commit comments