From 4117eb71cc492ba79e347968e83664a6fc8c0169 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Thu, 21 Dec 2017 10:40:48 +0100 Subject: [PATCH] Report the number of tests --- www/common/test.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/common/test.js b/www/common/test.js index fb6bf6034..ed48750a5 100644 --- a/www/common/test.js +++ b/www/common/test.js @@ -4,9 +4,11 @@ define([], function () { var locks = []; var tests = []; var failed = false; + var totalTests = 0; var out = window.__CRYPTPAD_TEST_OBJ__ = function (f) { if (!out.testing) { return; } tests.push(f); + totalTests++; var runLock = function (lock) { lock(function () { setTimeout(function () { runLock(locks.shift()); }); }); }; @@ -18,7 +20,10 @@ define([], function () { throw new Error("Pass called on an unknown test (called multiple times?)"); } tests.splice(i, 1); - if (!tests.length) { out.passed(); } + if (!tests.length) { + console.log("Completed " + totalTests + " successfully"); + out.passed(); + } }, fail: function (reason) { failed = true;