File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
packages/jest-runtime/src Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -43,15 +43,17 @@ export const findSiblingsWithFileExtension = (
43
43
44
44
const matches = glob
45
45
. sync ( `${ pathToModule } .*` , { windowsPathsNoEscape : true } )
46
- . map ( match => slash ( match ) )
47
46
. map ( match => {
48
- const relativePath = path . posix . relative ( slashedDirname , match ) ;
47
+ const slashedMap = slash ( match ) ;
48
+ const relativePath = path . posix . relative ( slashedDirname , slashedMap ) ;
49
49
50
- return path . posix . dirname ( match ) === slashedDirname
51
- ? `./${ relativePath } `
52
- : relativePath ;
50
+ const slashedPath =
51
+ path . posix . dirname ( slashedMap ) === slashedDirname
52
+ ? `./${ relativePath } `
53
+ : relativePath ;
54
+
55
+ return `\t'${ slashedPath } '` ;
53
56
} )
54
- . map ( match => `\t'${ match } '` )
55
57
. join ( '\n' ) ;
56
58
57
59
if ( matches ) {
You can’t perform that action at this time.
0 commit comments