mirror of https://gitee.com/bigwinds/arangodb
don't output the result json when running from an interactive shell.
This commit is contained in:
parent
93bc281e39
commit
353c01f04f
|
@ -180,7 +180,7 @@ function Done (suiteName) {
|
||||||
/// @brief runs a JSUnity test file
|
/// @brief runs a JSUnity test file
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function RunTest (path) {
|
function RunTest (path, outputReply) {
|
||||||
var content;
|
var content;
|
||||||
var f;
|
var f;
|
||||||
|
|
||||||
|
@ -193,7 +193,13 @@ function RunTest (path) {
|
||||||
throw "cannot create context function";
|
throw "cannot create context function";
|
||||||
}
|
}
|
||||||
|
|
||||||
return f(path);
|
var rc = f(path);
|
||||||
|
if (outputReply === true) {
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return rc.status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
|
@ -867,7 +867,7 @@ function runThere (options, instanceInfo, file) {
|
||||||
var t;
|
var t;
|
||||||
if (file.indexOf("-spec") === -1) {
|
if (file.indexOf("-spec") === -1) {
|
||||||
t = 'var runTest = require("jsunity").runTest; '+
|
t = 'var runTest = require("jsunity").runTest; '+
|
||||||
'return runTest(' + JSON.stringify(file) + ');';
|
'return runTest(' + JSON.stringify(file) + ', true);';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var jasmineReportFormat = options.jasmineReportFormat || 'progress';
|
var jasmineReportFormat = options.jasmineReportFormat || 'progress';
|
||||||
|
@ -912,7 +912,7 @@ function runHere (options, instanceInfo, file) {
|
||||||
try {
|
try {
|
||||||
if (file.indexOf("-spec") === -1) {
|
if (file.indexOf("-spec") === -1) {
|
||||||
var runTest = require("jsunity").runTest;
|
var runTest = require("jsunity").runTest;
|
||||||
result = runTest(file);
|
result = runTest(file, true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var jasmineReportFormat = options.jasmineReportFormat || 'progress';
|
var jasmineReportFormat = options.jasmineReportFormat || 'progress';
|
||||||
|
|
Loading…
Reference in New Issue