From ab1f14246ac0c520909ffbfccf379780f4fbe77f Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Thu, 9 Jul 2020 17:45:09 +0200 Subject: [PATCH] fix(curriculum): include stack with test errors (#39209) --- curriculum/test/test-challenges.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/curriculum/test/test-challenges.js b/curriculum/test/test-challenges.js index 1a9f074162..dbf5783db2 100644 --- a/curriculum/test/test-challenges.js +++ b/curriculum/test/test-challenges.js @@ -205,8 +205,9 @@ function cleanup() { } function runTests({ challengesForLang, meta }) { + // rethrow unhandled rejections to make sure the tests exit with -1 process.on('unhandledRejection', err => { - throw new Error(`unhandledRejection: ${err.name}, ${err.message}`); + throw err; }); describe('Check challenges', function() {