1
0
Fork 0

don't output the result json when running from an interactive shell.

This commit is contained in:
Wilfried Goesgens 2015-10-02 14:47:57 +02:00
parent 93bc281e39
commit 353c01f04f
2 changed files with 10 additions and 4 deletions

View File

@ -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;
}
}
// -----------------------------------------------------------------------------

View File

@ -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';