Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions packages/jest-runtime/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@

const matches = glob
.sync(`${pathToModule}.*`, {windowsPathsNoEscape: true})
.map(match => slash(match))
.map(match => {
const relativePath = path.posix.relative(slashedDirname, match);
const slashedMap = slash(match);
const relativePath = path.posix.relative(slashedDirname, slashedMap);

return path.posix.dirname(match) === slashedDirname
? `./${relativePath}`
: relativePath;
const slashedPath =
path.posix.dirname(slashedMap) === slashedDirname
? `./${relativePath}`
: relativePath;

Check warning on line 53 in packages/jest-runtime/src/helpers.ts

View check run for this annotation

Codecov / codecov/patch

packages/jest-runtime/src/helpers.ts#L53

Added line #L53 was not covered by tests

return `\t'${slashedPath}'`;
})
.map(match => `\t'${match}'`)
.join('\n');

if (matches) {
Expand Down
Loading