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
9 changes: 4 additions & 5 deletions packages/jest-cli/src/run_jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ export default (async function runJest({
onComplete: (testResults: AggregatedResult) => any,
failedTestsCache: ?FailedTestsCache,
}) {
if (globalConfig.globalSetup) {
// $FlowFixMe
await require(globalConfig.globalSetup)();
}
const sequencer = new TestSequencer();
let allTests = [];

Expand Down Expand Up @@ -184,7 +180,10 @@ export default (async function runJest({
// original value of rootDir. Instead, use the {cwd: Path} property to resolve
// paths when printing.
setConfig(contexts, {cwd: process.cwd()});

if (globalConfig.globalSetup) {
// $FlowFixMe
await require(globalConfig.globalSetup)();
}
const results = await new TestScheduler(globalConfig, {
startRun,
}).scheduleTests(allTests, testWatcher);
Expand Down