Skip to content

Commit 8b3b505

Browse files
committed
remove double loop
1 parent 3169d00 commit 8b3b505

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/jest-cli/src/runGlobalHook.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ export default ({
3939
}
4040

4141
const projectConfig =
42-
allTests
43-
.map(t => t.context.config)
44-
.find(c => c[moduleName] === modulePath) ||
42+
allTests.find(t => t.context.config[moduleName] === modulePath) ||
4543
// Fallback to first one
4644
allTests[0].context.config;
4745

0 commit comments

Comments
 (0)