diff --git a/js/common/modules/jsunity.js b/js/common/modules/jsunity.js index a3642a3b5b..0b7c936f8d 100644 --- a/js/common/modules/jsunity.js +++ b/js/common/modules/jsunity.js @@ -180,7 +180,7 @@ function Done (suiteName) { /// @brief runs a JSUnity test file //////////////////////////////////////////////////////////////////////////////// -function RunTest (path) { +function RunTest (path, outputReply) { var content; var f; @@ -193,7 +193,13 @@ function RunTest (path) { throw "cannot create context function"; } - return f(path); + var rc = f(path); + if (outputReply === true) { + return rc; + } + else { + return rc.status; + } } // ----------------------------------------------------------------------------- diff --git a/js/server/modules/org/arangodb/testing.js b/js/server/modules/org/arangodb/testing.js index fbdd009056..adfed95b3e 100644 --- a/js/server/modules/org/arangodb/testing.js +++ b/js/server/modules/org/arangodb/testing.js @@ -867,7 +867,7 @@ function runThere (options, instanceInfo, file) { var t; if (file.indexOf("-spec") === -1) { t = 'var runTest = require("jsunity").runTest; '+ - 'return runTest(' + JSON.stringify(file) + ');'; + 'return runTest(' + JSON.stringify(file) + ', true);'; } else { var jasmineReportFormat = options.jasmineReportFormat || 'progress'; @@ -912,7 +912,7 @@ function runHere (options, instanceInfo, file) { try { if (file.indexOf("-spec") === -1) { var runTest = require("jsunity").runTest; - result = runTest(file); + result = runTest(file, true); } else { var jasmineReportFormat = options.jasmineReportFormat || 'progress';