From 996b1e784bc90a5cd116b7322d0fe8871a5a0fbb Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Mon, 4 Apr 2016 16:22:19 -0400 Subject: [PATCH] Set exit code variable without calling process.exit `process.exit` quits immediately, without allowing buffered output from say, a `console.log` to be printed. See these Node.js issues: https://github.com/nodejs/node/issues/3669 https://github.com/nodejs/node/pull/3170 https://github.com/nodejs/node/issues/2972#issuecomment-146078649 --- bin/fuzzy-tester | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fuzzy-tester b/bin/fuzzy-tester index 8bf4db2..085bffe 100755 --- a/bin/fuzzy-tester +++ b/bin/fuzzy-tester @@ -29,7 +29,7 @@ var analyze_results = require( '../lib/analyze_results' ); // display results using the correct output generator var return_code = config.outputGenerator(evaled_results, config, testSuites); - process.exit(return_code); + process.exitCode = return_code; }; // find all test suites and test cases that will be run