File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
packages/jest-haste-map/src/__tests__ Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 66 */
77'use strict' ;
88
9+ const path = require ( 'path' ) ;
10+
911module . exports = {
10- getHasteName ( path ) {
12+ getHasteName ( filename ) {
1113 if (
12- path . includes ( '__mocks__' ) ||
13- path . includes ( 'NoHaste' ) ||
14- path . includes ( '/ module_dir/' ) ||
15- path . includes ( '/ sourcemaps/' )
14+ filename . includes ( '__mocks__' ) ||
15+ filename . includes ( 'NoHaste' ) ||
16+ filename . includes ( path . sep + ' module_dir' + path . sep ) ||
17+ filename . includes ( path . sep + ' sourcemaps' + path . sep )
1618 ) {
1719 return undefined ;
1820 }
1921
20- return path
21- . substr ( path . lastIndexOf ( '/' ) + 1 )
22+ return filename
23+ . substr ( filename . lastIndexOf ( path . sep ) + 1 )
2224 . replace ( / ( \. ( a n d r o i d | i o s | n a t i v e ) ) ? \. j s $ / , '' ) ;
2325 } ,
2426} ;
You can’t perform that action at this time.
0 commit comments