mirror of https://gitee.com/bigwinds/arangodb
Handle pending mocha tests in output
This commit is contained in:
parent
f442465445
commit
812060864b
|
@ -77,6 +77,10 @@ function logStats(stats) {
|
||||||
+ colors.COLOR_RED
|
+ colors.COLOR_RED
|
||||||
+ stats.failures
|
+ stats.failures
|
||||||
+ colors.COLOR_RESET
|
+ colors.COLOR_RESET
|
||||||
|
+ ' | '
|
||||||
|
+ colors.COLOR_CYAN
|
||||||
|
+ stats.pending
|
||||||
|
+ colors.COLOR_RESET
|
||||||
+ ' )'
|
+ ' )'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -102,6 +106,14 @@ function logSuite(suite, indentLevel) {
|
||||||
+ test.title
|
+ test.title
|
||||||
+ colors.COLOR_RESET
|
+ colors.COLOR_RESET
|
||||||
);
|
);
|
||||||
|
} else if (test.result === 'pending') {
|
||||||
|
print(
|
||||||
|
indent(indentLevel)
|
||||||
|
+ colors.COLOR_CYAN
|
||||||
|
+ '[SKIP] '
|
||||||
|
+ test.title
|
||||||
|
+ colors.COLOR_RESET
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
print(
|
print(
|
||||||
indent(indentLevel)
|
indent(indentLevel)
|
||||||
|
@ -155,10 +167,10 @@ function buildJson(results) {
|
||||||
newName = `${name} ${i++}`;
|
newName = `${name} ${i++}`;
|
||||||
}
|
}
|
||||||
result[newName] = {
|
result[newName] = {
|
||||||
status: stats.result === 'pass',
|
status: stats.result === 'pass' || stats.result === 'pending',
|
||||||
duration: stats.duration
|
duration: stats.duration
|
||||||
};
|
};
|
||||||
if (stats.result !== 'pass') {
|
if (stats.result !== 'pass' && stats.result !== 'pending') {
|
||||||
result[newName].message = stats.err.stack;
|
result[newName].message = stats.err.stack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue