mirror of
https://github.com/hanzoai/jest.git
synced 2026-09-24 16:59:57 +00:00
fix: simplify getting testUtilsReferences (#14529)
This commit is contained in:
+3
-2
@@ -116,9 +116,10 @@ packagesWithTs.forEach(({packageDir, pkg}) => {
|
||||
const tsConfig = JSON.parse(
|
||||
stripJsonComments(fs.readFileSync(tsConfigPath, 'utf8')),
|
||||
);
|
||||
const references = tsConfig.references.map(({path}) => path);
|
||||
|
||||
return references.some(reference => /test-utils$/.test(reference));
|
||||
return tsConfig.references.some(
|
||||
({path}) => path && path.endsWith('test-utils'),
|
||||
);
|
||||
});
|
||||
|
||||
if (hasJestTestUtils && testUtilsReferences.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user