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 = (
4343
4444 const matches = glob
4545 . sync ( `${ pathToModule } .*` , { windowsPathsNoEscape : true } )
46- . map ( match => slash ( match ) )
4746 . map ( match => {
48- const relativePath = path . posix . relative ( slashedDirname , match ) ;
47+ const slashedMap = slash ( match ) ;
48+ const relativePath = path . posix . relative ( slashedDirname , slashedMap ) ;
4949
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 } '` ;
5356 } )
54- . map ( match => `\t'${ match } '` )
5557 . join ( '\n' ) ;
5658
5759 if ( matches ) {
You can’t perform that action at this time.
0 commit comments