We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92c5e04 commit 1c1c958Copy full SHA for 1c1c958
1 file changed
packages/jest-haste-map/src/__tests__/haste_impl.js
@@ -6,19 +6,21 @@
6
*/
7
'use strict';
8
9
+const path = require('path');
10
+
11
module.exports = {
- getHasteName(path) {
12
+ getHasteName(filename) {
13
if (
- path.includes('__mocks__') ||
- path.includes('NoHaste') ||
14
- path.includes('/module_dir/') ||
15
- path.includes('/sourcemaps/')
+ filename.includes('__mocks__') ||
+ filename.includes('NoHaste') ||
16
+ filename.includes(path.sep + 'module_dir' + path.sep) ||
17
+ filename.includes(path.sep + 'sourcemaps' + path.sep)
18
) {
19
return undefined;
20
}
21
- return path
- .substr(path.lastIndexOf('/') + 1)
22
+ return filename
23
+ .substr(filename.lastIndexOf(path.sep) + 1)
24
.replace(/(\.(android|ios|native))?\.js$/, '');
25
},
26
};
0 commit comments