Skip to content

Commit

Permalink
Fix immediate execution for test result (jestjs#2556)
Browse files Browse the repository at this point in the history
* Fix immediate execution for test result

* Update runTest.js
  • Loading branch information
zouxuoz authored and cpojer committed Jan 11, 2017
1 parent b6ffc13 commit 8256904
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/jest-cli/src/runTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ function runTest(path: Path, config: Config, resolver: Resolver) {
}
result.memoryUsage = process.memoryUsage().heapUsed;
}
return result;

// Delay the resolution to allow log messages to be output.
return new Promise(resolve => setImmediate(() => resolve(result)));
}),
err => Promise.resolve().then(() => {
env.dispose();
Expand Down

0 comments on commit 8256904

Please sign in to comment.