mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Don't throw if failure is at index 0
This commit is contained in:
parent
836966c216
commit
a2d9ec3ea8
@ -64,13 +64,16 @@ readDir(rootDir + '/reports')
|
||||
))
|
||||
)
|
||||
.then((objects) => {
|
||||
let merged = objects[0];
|
||||
merged.testsuites.testsuite = Array.prototype.concat.apply([], objects.map((obj) => {
|
||||
if (obj) {
|
||||
return obj.testsuites.testsuite;
|
||||
} else {
|
||||
return parseFailureLog;
|
||||
}}));
|
||||
const merged = {
|
||||
testsuites: {
|
||||
testsuite: Array.prototype.concat.apply([], objects.map((obj) => {
|
||||
if (obj) {
|
||||
return obj.testsuites.testsuite;
|
||||
} else {
|
||||
return parseFailureLog;
|
||||
}}))
|
||||
}
|
||||
}
|
||||
let builder = new xml2js.Builder();
|
||||
let xml = builder.buildObject(merged);
|
||||
let resultName = path.resolve(rootDir, 'reports', dirName, 'sponge_log.xml');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user