File tree 1 file changed +5
-7
lines changed
packages/jest-core/src/lib
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import chalk = require( 'chalk' ) ;
9
9
import type { Config } from '@jest/types' ;
10
+ import { isNonNullable } from 'jest-util' ;
10
11
11
- const activeFilters = (
12
- globalConfig : Config . GlobalConfig ,
13
- delimiter = '\n' ,
14
- ) : string => {
12
+ const activeFilters = ( globalConfig : Config . GlobalConfig ) : string => {
15
13
const { testNamePattern, testPathPattern} = globalConfig ;
16
14
if ( testNamePattern || testPathPattern ) {
17
15
const filters = [
@@ -22,12 +20,12 @@ const activeFilters = (
22
20
? chalk . dim ( 'test name ' ) + chalk . yellow ( `/${ testNamePattern } /` )
23
21
: null ,
24
22
]
25
- . filter ( f => f )
23
+ . filter ( isNonNullable )
26
24
. join ( ', ' ) ;
27
25
28
- const messages = [ `\n${ chalk . bold ( 'Active Filters: ' ) } ${ filters } ` ] ;
26
+ const messages = `\n${ chalk . bold ( 'Active Filters: ' ) } ${ filters } ` ;
29
27
30
- return messages . filter ( message => ! ! message ) . join ( delimiter ) ;
28
+ return messages ;
31
29
}
32
30
33
31
return '' ;
You can’t perform that action at this time.
0 commit comments