File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -340,8 +340,10 @@ describe('resolve', function () {
340
340
expect ( fileExistsWithCaseSync ( f , testSettings ) )
341
341
. to . be . true ;
342
342
} ) ;
343
- it ( 'detecting case should include parent folder path' , function ( ) {
343
+ it . only ( 'detecting case should include parent folder path' , function ( ) {
344
344
const f = path . join ( process . cwd ( ) . toUpperCase ( ) , './tests/files/jsx/MyUnCoolComponent.jsx' ) ;
345
+ console . log ( process . cwd ( ) ) ;
346
+ console . log ( f ) ;
345
347
expect ( fileExistsWithCaseSync ( f , testSettings , true ) )
346
348
. to . be . false ;
347
349
} ) ;
Original file line number Diff line number Diff line change @@ -55,21 +55,28 @@ function tryRequire(target, sourceFile) {
55
55
exports . fileExistsWithCaseSync = function fileExistsWithCaseSync ( filepath , cacheSettings , strict ) {
56
56
// don't care if the FS is case-sensitive
57
57
if ( CASE_SENSITIVE_FS ) return true ;
58
-
58
+ console . log ( 'case insensitive' ) ;
59
59
// null means it resolved to a builtin
60
60
if ( filepath === null ) return true ;
61
61
if ( filepath . toLowerCase ( ) === process . cwd ( ) . toLowerCase ( ) && ! strict ) return true ;
62
62
const parsedPath = path . parse ( filepath ) ;
63
+ console . log ( 'parsedPath' , parsedPath ) ;
63
64
const dir = parsedPath . dir ;
64
65
65
66
let result = fileExistsCache . get ( filepath , cacheSettings ) ;
66
- if ( result != null ) return result ;
67
+ if ( result != null ) {
68
+ console . log ( 'result' , result ) ;
69
+ return result ;
70
+ }
67
71
68
72
// base case
69
73
if ( dir === '' || parsedPath . root === filepath ) {
74
+ console . log ( 'dir' , dir ) ;
75
+ console . log ( 'parsedPath.root' , parsedPath . root ) ;
70
76
result = true ;
71
77
} else {
72
78
const filenames = fs . readdirSync ( dir ) ;
79
+ console . log ( 'filenames:' , filenames ) ;
73
80
if ( filenames . indexOf ( parsedPath . base ) === - 1 ) {
74
81
result = false ;
75
82
} else {
You can’t perform that action at this time.
0 commit comments