Ensure that errors in testing are handled correctly

This commit is contained in:
Oliver Eyton-Williams
2019-04-01 18:19:25 +02:00
committed by mrugesh
parent 8b1f5ddded
commit c6cbaf3658
2 changed files with 8 additions and 2 deletions

View File

@ -83,6 +83,11 @@ let page;
runTests();
async function runTests() {
process.on('unhandledRejection', err => {
spinner.stop();
throw new Error(`unhandledRejection: ${err.name}, ${err.message}`);
});
let testLangs = [...supportedLangs];
if (process.env.TEST_CHALLENGES_FOR_LANGS) {
const filterLangs = process.env.TEST_CHALLENGES_FOR_LANGS.split(',').map(