diff --git a/src/__tests__/offline/browser.spec.js b/src/__tests__/offline/browser.spec.js index bce2020eb..81bc3efd3 100644 --- a/src/__tests__/offline/browser.spec.js +++ b/src/__tests__/offline/browser.spec.js @@ -168,10 +168,10 @@ tape('Browser offline mode', function (assert) { // Manager tests const expectedSplitView1 = { - name: 'testing_split', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['on'], configs: {}, defaultTreatment: 'control', sets: [] + name: 'testing_split', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['on'], configs: {}, defaultTreatment: 'control', sets: [], trackImpressions: true }; const expectedSplitView2 = { - name: 'testing_split_with_config', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['off'], configs: { off: '{ "color": "blue" }' }, defaultTreatment: 'control', sets: [] + name: 'testing_split_with_config', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['off'], configs: { off: '{ "color": "blue" }' }, defaultTreatment: 'control', sets: [], trackImpressions: true }; assert.deepEqual(manager.names(), ['testing_split', 'testing_split_with_config']); assert.deepEqual(manager.split('testing_split'), expectedSplitView1); @@ -282,7 +282,7 @@ tape('Browser offline mode', function (assert) { // Manager tests const expectedSplitView3 = { - name: 'testing_split_with_config', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['nope'], configs: {}, defaultTreatment: 'control', sets: [] + name: 'testing_split_with_config', trafficType: 'localhost', killed: false, changeNumber: 0, treatments: ['nope'], configs: {}, defaultTreatment: 'control', sets: [], trackImpressions: true }; assert.deepEqual(manager.names(), ['testing_split', 'testing_split_2', 'testing_split_3', 'testing_split_with_config']); assert.deepEqual(manager.split('testing_split'), expectedSplitView1); diff --git a/src/__tests__/offline/node.spec.js b/src/__tests__/offline/node.spec.js index ef12324b2..3e3166b6c 100644 --- a/src/__tests__/offline/node.spec.js +++ b/src/__tests__/offline/node.spec.js @@ -250,17 +250,17 @@ function ManagerDotSplitTests(assert) { const expectedView1 = { name: 'testing_split', changeNumber: 0, killed: false, trafficType: 'localhost', treatments: ['on'], configs: {}, defaultTreatment: 'control', - sets: [] + sets: [], trackImpressions: true }; const expectedView2 = { name: 'testing_split2', changeNumber: 0, killed: false, trafficType: 'localhost', treatments: ['off'], configs: {}, defaultTreatment: 'control', - sets: [] + sets: [], trackImpressions: true }; const expectedView3 = { name: 'testing_split3', changeNumber: 0, killed: false, trafficType: 'localhost', treatments: ['custom_treatment'], configs: {}, defaultTreatment: 'control', - sets: [] + sets: [], trackImpressions: true }; assert.deepEqual(manager.split('testing_split'), expectedView1); @@ -294,7 +294,8 @@ function ManagerDotYamlTests(mockFileName, assert) { treatments: ['on'], configs: {}, sets: [], - defaultTreatment: 'control' + defaultTreatment: 'control', + trackImpressions: true }; const expectedView2 = { name: 'testing_split_only_wl', @@ -304,7 +305,8 @@ function ManagerDotYamlTests(mockFileName, assert) { treatments: ['whitelisted'], configs: {}, sets: [], - defaultTreatment: 'control' + defaultTreatment: 'control', + trackImpressions: true }; const expectedView3 = { name: 'testing_split_with_wl', @@ -317,7 +319,8 @@ function ManagerDotYamlTests(mockFileName, assert) { multi_key_wl: '{"color": "brown"}' }, sets: [], - defaultTreatment: 'control' + defaultTreatment: 'control', + trackImpressions: true }; const expectedView4 = { name: 'testing_split_off_with_config', @@ -329,7 +332,8 @@ function ManagerDotYamlTests(mockFileName, assert) { off: '{"color": "green"}' }, sets: [], - defaultTreatment: 'control' + defaultTreatment: 'control', + trackImpressions: true }; assert.deepEqual(manager.split('testing_split_on'), expectedView1); @@ -410,15 +414,15 @@ function MultipleInstancesTests(assert) { const expectedView1 = { name: 'testing_split', changeNumber: 0, killed: false, trafficType: 'localhost', - treatments: ['on'], configs: {}, sets: [] + treatments: ['on'], configs: {}, sets: [], trackImpressions: true }; const expectedView2 = { name: 'testing_split2', changeNumber: 0, killed: false, trafficType: 'localhost', - treatments: ['off'], configs: {}, sets: [] + treatments: ['off'], configs: {}, sets: [], trackImpressions: true }; const expectedView3 = { name: 'testing_split3', changeNumber: 0, killed: false, trafficType: 'localhost', - treatments: ['custom_treatment'], configs: {}, sets: [] + treatments: ['custom_treatment'], configs: {}, sets: [], trackImpressions: true }; assert.deepEqual(manager.split('testing_split'), expectedView1);