Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Don't call process.exit() in Karma during normal pass / fail flow #14669

Merged
merged 1 commit into from
Apr 17, 2018
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
32 changes: 9 additions & 23 deletions build-system/tasks/runtime-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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'));

Expand Down Expand Up @@ -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(
Expand Down