From 31b41471a4cdd51a232ac21a91d73d8bf3ec074e Mon Sep 17 00:00:00 2001 From: Andreas Streichardt Date: Wed, 14 Dec 2016 17:41:08 +0100 Subject: [PATCH] Unittest should report a failure to the console --- UnitTests/unittest.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UnitTests/unittest.js b/UnitTests/unittest.js index 5dba3c4d8e..ee62623c2b 100644 --- a/UnitTests/unittest.js +++ b/UnitTests/unittest.js @@ -247,7 +247,11 @@ function main(argv) { UnitTest.unitTestPrettyPrintResults(r); - return r.crashed ? -1 : 0; + return r.status; } -main(ARGUMENTS); +let result = main(ARGUMENTS); +if (!result) { + // force an error in the console + throw 'peng'; +}