packages/cli: fix jest module mapper to only match entire module name

This commit is contained in:
Patrik Oldsberg
2020-06-14 13:11:16 +02:00
parent 8aee97383e
commit 46c51f2698
+1 -1
View File
@@ -41,7 +41,7 @@ async function getConfig() {
for (const pkg of packages) {
const mainSrc = pkg.get('main:src');
if (mainSrc) {
moduleNameMapper[pkg.name] = path.resolve(pkg.location, mainSrc);
moduleNameMapper[`^${pkg.name}$`] = path.resolve(pkg.location, mainSrc);
}
}
}