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 e16ce6b commit bc82cccCopy full SHA for bc82ccc
packages/jest-haste-map/src/get_mock_name.js
@@ -14,7 +14,9 @@ const MOCKS_PATTERN = path.sep + '__mocks__' + path.sep;
14
15
const getMockName = (filePath: string) => {
16
const mockPath = filePath.split(MOCKS_PATTERN)[1];
17
- return mockPath.substring(0, mockPath.lastIndexOf(path.extname(mockPath)));
+ return mockPath
18
+ .substring(0, mockPath.lastIndexOf(path.extname(mockPath)))
19
+ .replace(/\\/g, '/');
20
};
21
22
module.exports = getMockName;
0 commit comments