diff --git a/src/v0/destinations/impact/util.js b/src/v0/destinations/impact/util.js index 7e41314984..8fb43a8df6 100644 --- a/src/v0/destinations/impact/util.js +++ b/src/v0/destinations/impact/util.js @@ -102,7 +102,7 @@ const populateProductProperties = (productsMapping, properties) => { } }); } else { - // Not providing product level mapping here as following are fetched from properties level and product level + // Not providing product level mapping here as following are fetched from properties level const index = 1; productProperties[getPropertyName('ItemBrand', index)] = brand; productProperties[getPropertyName('ItemCategory', index)] = category; diff --git a/src/v0/destinations/impact/utils.test.js b/src/v0/destinations/impact/utils.test.js index c115645935..17f90bbc5d 100644 --- a/src/v0/destinations/impact/utils.test.js +++ b/src/v0/destinations/impact/utils.test.js @@ -13,6 +13,7 @@ describe('populateProductProperties', () => { { to: 'ItemPromoCode', from: 'PromoCode' }, { to: 'ItemQuantity', from: 'Quantity' }, { to: 'ItemSku', from: 'Sku' }, + { to: 'dummyRHS', from: 'dummyLHS' }, ]; const properties = { products: [ @@ -24,6 +25,7 @@ describe('populateProductProperties', () => { PromoCode: 'PromoCode1', Quantity: 1, Sku: 'Sku1', + dummyLHS: 'DummyValue', }, { Brand: 'Brand2', @@ -32,7 +34,6 @@ describe('populateProductProperties', () => { Price: 20, PromoCode: 'PromoCode2', Quantity: 2, - Sku: 'Sku2', }, ], brand: 'Brand3', @@ -62,7 +63,7 @@ describe('populateProductProperties', () => { ItemPrice2: 20, ItemPromoCode2: 'PromoCode2', ItemQuantity2: 2, - ItemSku2: 'Sku2', + dummyRHS1: 'DummyValue', }); }); @@ -94,8 +95,13 @@ describe('populateProductProperties', () => { ItemSku1: 'Sku3', }); }); - it('should return product properties with custom mappings from properties', () => { - const productsMapping = [{ from: 'dummy_LHS', to: 'dummy_RHS' }]; + it('should return product properties with custom mappings', () => { + const productsMapping = [ + { + from: 'dummy_LHS', + to: 'dummy_RHS', + }, + ]; const properties = { products: [ {