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
@@ -62,7 +63,7 @@ export default function (assert) {
62
63
properties: undefined
63
64
};
64
65
65
-
assert.equal(listener.logImpression.callCount,4,'Impression listener logImpression method should be called after we call client.getTreatment, once per each impression generated.');
66
+
assert.equal(listener.logImpression.callCount,5,'Impression listener logImpression method should be called after we call client.getTreatment, once per each impression generated.');
assert.true(dependencyChildImpr,'Split we wanted to evaluate should be present on the impressions.');
59
60
assert.false(resp.some(e=>e.f==='hierarchical_dep_always_on'),'Parent split evaluations should not result in impressions.');
@@ -62,6 +63,7 @@ export default function (fetchMock, assert) {
62
63
assert.false(Object.prototype.hasOwnProperty.call(splitWithConfigImpr.i[0],'configuration'),'Impressions do not change with configuration evaluations.');
63
64
assert.false(Object.prototype.hasOwnProperty.call(splitWithConfigImpr.i[0],'config'),'Impressions do not change with configuration evaluations.');
},'Unique keys for the evaluation with impressions disabled true.');
64
64
@@ -153,6 +153,12 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
153
153
assert.equal(awaitclient.getTreatment('hierarchical_splits_testing_on_negated'),'off','Evaluations using pluggable storage should be correct.');
154
154
assert.equal(awaitclient.getTreatment('always-on-impressions-disabled-true'),'on','Evaluations using pluggable storage should be correct.');
155
155
156
+
// Verify impressionsDisabled option
157
+
assert.deepEqual(awaitclient.getTreatment('always-on',undefined,{impressionsDisabled: true}),'on','Evaluations with impressionsDisabled: true should be correct.');
158
+
assert.deepEqual(awaitclient.getTreatmentWithConfig('always-on',undefined,{impressionsDisabled: true}),{treatment: 'on',config: null},'Evaluations with impressionsDisabled: true should be correct.');
159
+
assert.deepEqual(awaitclient.getTreatments(['always-on'],undefined,{impressionsDisabled: true}),{'always-on': 'on'},'Evaluations with impressionsDisabled: true should be correct.');
160
+
assert.deepEqual(awaitclient.getTreatmentsWithConfig(['always-on'],undefined,{impressionsDisabled: true}),{'always-on': {treatment: 'on',config: null}},'Evaluations with impressionsDisabled: true should be correct.');
161
+
156
162
assert.equal(typeofclient.track('user','test.event',18).then,'function','Track calls should always return a promise on Consumer mode.');
157
163
assert.equal(typeofclient.track().then,'function','Track calls should always return a promise on Consumer mode, even when parameters are incorrect.');
158
164
@@ -311,6 +317,13 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
311
317
assert.equal(awaitclient.getTreatment('hierarchical_splits_testing_off'),'off','Evaluations using pluggable storage should be correct.');
312
318
assert.equal(awaitclient.getTreatment('hierarchical_splits_testing_on_negated'),'off','Evaluations using pluggable storage should be correct.');
313
319
320
+
321
+
// Verify impressionsDisabled option
322
+
assert.deepEqual(awaitclient.getTreatment('always-on',undefined,{impressionsDisabled: true}),'on','Evaluations with impressionsDisabled: true should be correct.');
323
+
assert.deepEqual(awaitclient.getTreatmentWithConfig('always-on',undefined,{impressionsDisabled: true}),{treatment: 'on',config: null},'Evaluations with impressionsDisabled: true should be correct.');
324
+
assert.deepEqual(awaitclient.getTreatments(['always-on'],undefined,{impressionsDisabled: true}),{'always-on': 'on'},'Evaluations with impressionsDisabled: true should be correct.');
325
+
assert.deepEqual(awaitclient.getTreatmentsWithConfig(['always-on'],undefined,{impressionsDisabled: true}),{'always-on': {treatment: 'on',config: null}},'Evaluations with impressionsDisabled: true should be correct.');
326
+
314
327
assert.equal(typeofclient.track('user','test.event',18).then,'function','Track calls should always return a promise on Consumer mode.');
315
328
assert.equal(typeofclient.track().then,'function','Track calls should always return a promise on Consumer mode, even when parameters are incorrect.');
0 commit comments