File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
packages/jest-core/src/lib Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 66 */
77
88import type { Config } from '@jest/types' ;
9- import { replacePathSepForRegex } from 'jest-regex -util' ;
9+ import { TestPathPatterns } from 'jest-util' ;
1010import type { AllowedConfigOptions } from 'jest-watcher' ;
1111
1212type ExtraConfigOptions = Partial <
@@ -31,15 +31,14 @@ export default function updateGlobalConfig(
3131 newConfig . testNamePattern = options . testNamePattern || '' ;
3232 }
3333
34- if ( options . testPathPattern !== undefined ) {
35- newConfig . testPathPattern =
36- replacePathSepForRegex ( options . testPathPattern ) || '' ;
34+ if ( options . testPathPatterns !== undefined ) {
35+ newConfig . testPathPatterns = options . testPathPatterns ;
3736 }
3837
3938 newConfig . onlyChanged =
4039 ! newConfig . watchAll &&
4140 ! newConfig . testNamePattern &&
42- ! newConfig . testPathPattern ;
41+ ! new TestPathPatterns ( newConfig ) . isSet ( ) ;
4342
4443 if ( typeof options . bail === 'boolean' ) {
4544 newConfig . bail = options . bail ? 1 : 0 ;
You can’t perform that action at this time.
0 commit comments