From 582cc55cffc198f3401f90a0b32e2fcbe89afee1 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Sun, 27 Oct 2013 10:02:44 +0200 Subject: [PATCH] Display number of failed tests and corresponding files --- test/run-tests.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/run-tests.js b/test/run-tests.js index a3268dc3..f8e88d48 100755 --- a/test/run-tests.js +++ b/test/run-tests.js @@ -8,9 +8,14 @@ var sys = require("util"); var tests_dir = path.dirname(module.filename); var failures = 0; +var failed_files = {}; run_compress_tests(); -if (failures) process.exit(1); +if (failures) { + sys.error("\n!!! Failed " + failures + " test cases."); + sys.error("!!! " + Object.keys(failed_files).join(", ")); + process.exit(1); +} /* -----[ utils ]----- */ @@ -86,6 +91,7 @@ function run_compress_tests() { expected: expect }); failures++; + failed_files[file] = 1; } } var tests = parse_test(path.resolve(dir, file)); -- 2.34.1