File tree 1 file changed +11
-12
lines changed
1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -463,29 +463,28 @@ function addFiles(kind) {
463
463
file = file . substring ( 1 ) ;
464
464
}
465
465
466
- if ( ! path . isAbsolute ( file ) ) {
467
- // Don't use path.join because it will convert slashes to backslashes
468
- // on Windows, and glob interprets backslashes as escape sequences.
469
- file = [
470
- this . projectBaseDir ,
471
- this . specDir ,
472
- file
473
- ] . join ( '/' ) ;
474
- }
475
-
476
466
return {
477
467
includeFiles : ongoing . includeFiles . concat ( ! hasNegation ? [ file ] : [ ] ) ,
478
468
excludeFiles : ongoing . excludeFiles . concat ( hasNegation ? [ file ] : [ ] )
479
469
} ;
480
470
} , { includeFiles : [ ] , excludeFiles : [ ] } ) ;
481
471
472
+ const baseDir = `${ this . projectBaseDir } /${ this . specDir } ` ;
473
+
482
474
includeFiles . forEach ( function ( file ) {
483
475
const filePaths = glob
484
- . sync ( file , { ignore : excludeFiles } )
476
+ . sync ( file , { cwd : baseDir , ignore : excludeFiles } )
477
+ . map ( function ( f ) {
478
+ if ( path . isAbsolute ( f ) ) {
479
+ return f ;
480
+ } else {
481
+ return unWindows ( path . join ( baseDir , f ) ) ;
482
+ }
483
+ } )
485
484
. filter ( function ( filePath ) {
486
485
return fileArr . indexOf ( filePath ) === - 1 ;
487
486
} )
488
- // Sort file paths to match the behavior of Glob <9 .
487
+ // Sort file paths consistently. Glob <9 did this but Glob >= 9 doesn't .
489
488
// Jasmine doesn't care about the order, but users might.
490
489
. sort ( ) ;
491
490
You can’t perform that action at this time.
0 commit comments