diff --git a/test/runner.js b/test/runner.js index d23514a..983f0cd 100644 --- a/test/runner.js +++ b/test/runner.js @@ -23,6 +23,13 @@ import * as testLFSServer from './server/server'; // http://eng.wealthfront.com/2016/11/03/handling-unhandledrejections-in-node-and-the-browser/ process.on('unhandledRejection', (err) => { console.error('CAUGHT ERROR:', err); // eslint-disable-line no-console + + try { + testLFSServer.stop(); + } catch (e) { + // The server may not have been started yet + } + process.exit(1); });