Skip to content

Commit 0d524e3

Browse files
committed
Server-stats plugin test fix
1 parent 51b268e commit 0d524e3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

plugins/server-stats/tests.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ function verifyAddedEvents(addedEvents, initialRequest) {
6464
if (!res || (!res.length && !initialRequest)) {
6565
throw ({err: "Invalid length"});
6666
}
67-
6867
if (initialRequest) {
6968
lastEventCounts.e = res && res[0] && res[0].e ? res[0].e : 0;
7069
lastEventCounts.ce = res && res[0] && res[0].ce ? res[0].ce : 0;
@@ -79,8 +78,8 @@ function verifyAddedEvents(addedEvents, initialRequest) {
7978
const internalEventKey = statInternalEvents[key] || 'ce';
8079

8180
lastEventCounts[internalEventKey] = lastEventCounts[internalEventKey] || 0;
82-
lastEventCounts[internalEventKey] += event.count;
83-
lastEventCounts.e += event.count;
81+
lastEventCounts[internalEventKey] += 1;
82+
lastEventCounts.e += 1;
8483
});
8584
if (!addedEvents.filter(item => item.key === '[CLY]_session').length) { // then session included with begin_session=1 and count it also.
8685
lastEventCounts.s++;

0 commit comments

Comments
 (0)