testaro 4.2.3 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
package/tests/ibm.js
CHANGED
|
@@ -30,23 +30,29 @@ const run = async content => {
|
|
|
30
30
|
// Reports the result of an IBM test.
|
|
31
31
|
const report = (result, withItems) => {
|
|
32
32
|
const data = {};
|
|
33
|
-
if (result) {
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
data.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
if (result && result.report && result.report.summary) {
|
|
34
|
+
const totals = result.report.summary.counts;
|
|
35
|
+
if (totals) {
|
|
36
|
+
data.totals = totals;
|
|
37
|
+
if (withItems) {
|
|
38
|
+
data.items = result.report.results;
|
|
39
|
+
data.items.forEach(item => {
|
|
40
|
+
delete item.apiArgs;
|
|
41
|
+
delete item.category;
|
|
42
|
+
delete item.ignored;
|
|
43
|
+
delete item.messageArgs;
|
|
44
|
+
delete item.reasonId;
|
|
45
|
+
delete item.ruleTime;
|
|
46
|
+
delete item.value;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
data.error = 'ERROR: ibm test delivered no totals';
|
|
46
52
|
}
|
|
47
53
|
}
|
|
48
54
|
else {
|
|
49
|
-
data.error = 'ERROR: ibm test
|
|
55
|
+
data.error = 'ERROR: ibm test delivered no report summary';
|
|
50
56
|
}
|
|
51
57
|
return data;
|
|
52
58
|
};
|