You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/__tests__/consumer/node_redis.spec.js
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ const NA = 'NA';
23
23
24
24
constredisPort='6385';
25
25
26
-
constTOTAL_RAW_IMPRESSIONS=16;
26
+
constTOTAL_RAW_IMPRESSIONS=17;
27
27
constTOTAL_EVENTS=2;
28
28
constDEDUPED_IMPRESSIONS=3;
29
29
@@ -118,7 +118,8 @@ tape('Node.js Redis', function (t) {
118
118
119
119
/** Evaluation, track and manager methods on SDK_READY */
120
120
121
-
assert.equal(awaitclient.getTreatment('UT_Segment_member','UT_IN_SEGMENT'),'on','Evaluations using Redis storage should be correct.');
121
+
assert.equal(awaitclient.getTreatment('UT_Segment_member','UT_IN_SEGMENT',undefined,{properties: {/* empty properties are ignored */}}),'on','Evaluations using Redis storage should be correct.');
122
+
assert.equal(awaitclient.getTreatment('UT_Segment_member','UT_IN_SEGMENT',undefined,{properties: {some: 'value1'}}),'on','Evaluations using Redis storage should be correct.');
122
123
assert.equal(awaitclient.getTreatment('other','UT_IN_SEGMENT'),'off','Evaluations using Redis storage should be correct.');
123
124
124
125
assert.equal(awaitclient.getTreatment('UT_Segment_member','UT_NOT_IN_SEGMENT'),'off','Evaluations using Redis storage should be correct.');
@@ -223,7 +224,9 @@ tape('Node.js Redis', function (t) {
223
224
// this should be deduped
224
225
assert.equal(awaitclient.getTreatment('other','UT_IN_SEGMENT'),'off','Evaluations using Redis storage should be correct.');
225
226
// this should be deduped
226
-
assert.equal(awaitclient.getTreatment('other','UT_IN_SEGMENT'),'off','Evaluations using Redis storage should be correct.');
227
+
assert.equal(awaitclient.getTreatment('other','UT_IN_SEGMENT',undefined,{properties: {/* empty properties are ignored */}}),'off','Evaluations using Redis storage should be correct.');
228
+
// this should not be deduped because of properties
229
+
assert.equal(awaitclient.getTreatment('other','UT_IN_SEGMENT',undefined,{properties: {some: 'value1'}}),'off','Evaluations using Redis storage should be correct.');
227
230
228
231
assert.equal(awaitclient.getTreatment('UT_Segment_member','UT_NOT_IN_SEGMENT'),'off','Evaluations using Redis storage should be correct.');
229
232
assert.equal(awaitclient.getTreatment('other','UT_NOT_IN_SEGMENT'),'on','Evaluations using Redis storage should be correct.');
0 commit comments