Skip to content

Commit ed052bb

Browse files
author
gcohen
committed
Create an empty result for the step even if none occured.
1 parent 051c7c1 commit ed052bb

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

web/examples/presenceTest350.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,13 @@
8484
1: {
8585
"actor": ["subscribe", channelB, 0],
8686

87-
"listener":
88-
[
89-
["leave", channelA, 5000],
90-
["join", channelA, 5000],
91-
["join", channelB, 5000]
92-
] // when more than two rules are in an array, they:
93-
// can happen in any order
94-
// must both happen, in order for that step to pass
87+
"listener": [
88+
["leave", channelA, 5000],
89+
["join", channelA, 5000],
90+
["join", channelB, 5000]
91+
] // when more than two rules are in an array, they:
92+
// can happen in any order
93+
// must both happen, in order for that step to pass
9594
},
9695

9796
2: {
@@ -218,7 +217,11 @@
218217

219218
console.log("\n" + new Date + ": step " + currentStep + " complete.");
220219

221-
for (a = 0; a < testResults[currentStep].length; a++){
220+
if (!testResults[currentStep]) {
221+
testResults.push([{step: currentStep, action: "none", uuid: "none", timestamp: "none", date: new Date}]);
222+
}
223+
224+
for (a = 0; a < testResults[currentStep].length; a++) {
222225
var stringResults = JSON.stringify(testResults[currentStep][a]);
223226
console.log("\nStep " + currentStep + " results: " + stringResults + "\n");
224227
}

0 commit comments

Comments
 (0)