diff --git a/build-system/tasks/runtime-test.js b/build-system/tasks/runtime-test.js index d0641552558ff..f6eb4e5165d15 100644 --- a/build-system/tasks/runtime-test.js +++ b/build-system/tasks/runtime-test.js @@ -239,8 +239,6 @@ function runTests() { log(red('ERROR:'), 'Only integration tests may be run on the full set of ' + 'Sauce Labs browsers'); log('Use', cyan('--saucelabs'), 'with', cyan('--integration')); - // Flush stdout. - process.stdout.write('\n'); process.exit(); } @@ -337,22 +335,14 @@ function runTests() { } // Run fake-server to test XHR responses. - const server = gulp.src(process.cwd()) - .pipe(webserver({ - port: 31862, - host: 'localhost', - directoryListing: true, - middleware: [app], - }) - .on('kill', function() { - log(yellow( - 'Shutting down test responses server on localhost:31862')); - process.nextTick(function() { - // Flush stdout. - process.stdout.write('\n'); - process.exit(); - }); - })); + const server = gulp.src(process.cwd()).pipe(webserver({ + port: 31862, + host: 'localhost', + directoryListing: true, + middleware: [app], + }).on('kill', function() { + log(yellow('Shutting down test responses server on localhost:31862')); + })); log(yellow( 'Started test responses server on localhost:31862')); @@ -380,12 +370,8 @@ function runTests() { log( red('ERROR:'), yellow('Karma test failed with exit code ' + exitCode)); - // Flush stdout. - process.stdout.write('\n'); - process.exit(exitCode); - } else { - resolver(); } + resolver(); }).on('run_start', function() { if (argv.saucelabs || argv.saucelabs_lite) { console./* OK*/log(green(