testilo 47.1.0 → 47.1.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "47.1.0",
3
+ "version": "47.1.1",
4
4
  "description": "Prepares Testaro jobs and processes Testaro reports",
5
5
  "main": "call.js",
6
6
  "scripts": {
@@ -72,10 +72,17 @@ exports.collateExcerpts = report => {
72
72
  if (Object.keys(texts).length) {
73
73
  // For each path ID in it:
74
74
  Object.keys(texts).forEach(pathID => {
75
- const toolNames = Object.keys(texts[pathID]);
76
- // If the element has only 1 text:
75
+ let toolNames = Object.keys(texts[pathID]);
76
+ // Delete all empty texts.
77
+ toolNames.forEach(toolName => {
78
+ if (! texts[pathID][toolName]) {
79
+ delete texts[pathID][toolName];
80
+ }
81
+ });
82
+ toolNames = Object.keys(texts[pathID]);
83
+ // If the element has only 1 remaining text:
77
84
  if (toolNames.length === 1) {
78
- // Change the key to unanimous.
85
+ // Change its key to unanimous.
79
86
  texts[pathID].unanimous = texts[pathID][toolNames[0]];
80
87
  delete texts[pathID][toolNames[0]];
81
88
  }
@@ -91,7 +98,7 @@ exports.collateExcerpts = report => {
91
98
  // Consolidate the texts to 1 unanimous text.
92
99
  texts[pathID].unanimous = texts[pathID][toolNames[0]];
93
100
  toolNames.forEach(toolName => {
94
- if (toolName !== toolNames[0]) {
101
+ if (toolName !== 'unanimous') {
95
102
  delete texts[pathID][toolName];
96
103
  }
97
104
  });