Skip to content

Commit

Permalink
remove double loop
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jan 18, 2019
1 parent 3169d00 commit 8b3b505
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/jest-cli/src/runGlobalHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ export default ({
}

const projectConfig =
allTests
.map(t => t.context.config)
.find(c => c[moduleName] === modulePath) ||
allTests.find(t => t.context.config[moduleName] === modulePath) ||
// Fallback to first one
allTests[0].context.config;

Expand Down

0 comments on commit 8b3b505

Please sign in to comment.