From dd5bd5d5e74c56f3a8376b7cf82aad4af89085f8 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Thu, 30 Mar 2017 00:15:40 +0100 Subject: [PATCH] Added timeout back to test runner. --- test/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/index.js b/test/index.js index 09eeee8e..fba3e43a 100644 --- a/test/index.js +++ b/test/index.js @@ -66,6 +66,15 @@ function handleTestResult(testResult) { } +/** + * Fail if the process takes longer than 10 seconds. + */ +setTimeout(function() { + console.log("Tests took longer than 10 seconds to run, returning."); + process.exit(1); +}, 1 * 1000); + + TestRegister.runTests() .then(function(results) { results.forEach(handleTestResult);