Permalink
Browse files

Fix: Prevent crash from swallowing console.log (fixes #5381)

  • Loading branch information...
IanVS committed Feb 26, 2016
1 parent 6fd82a6 commit 78f7ca9ff7bdd92465a4e3eed47e5ec88e763d36
Showing with 9 additions and 2 deletions.
  1. +9 −2 tests/lib/config/config-initializer.js
@@ -220,8 +220,15 @@ describe("configInitializer", function() {
origLog = console.log;
console.log = function() {}; // necessary to replace, because of progress bar
process.chdir(fixtureDir);
config = init.processAnswers(answers);
process.chdir(originalDir);
try {
config = init.processAnswers(answers);
process.chdir(originalDir);
} catch (err) {
// if processAnswers crashes, we need to be sure to restore cwd and console.log
console.log = origLog;
process.chdir(originalDir);
throw err;
}
});
beforeEach(function() {

0 comments on commit 78f7ca9

Please sign in to comment.