Skip to content

Commit

Permalink
chore: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anantjain45823 committed Apr 14, 2024
1 parent 4164c8f commit f89d279
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/v0/destinations/impact/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -24,6 +25,7 @@ describe('populateProductProperties', () => {
PromoCode: 'PromoCode1',
Quantity: 1,
Sku: 'Sku1',
dummyLHS: 'DummyValue',
},
{
Brand: 'Brand2',
Expand All @@ -32,7 +34,6 @@ describe('populateProductProperties', () => {
Price: 20,
PromoCode: 'PromoCode2',
Quantity: 2,
Sku: 'Sku2',
},
],
brand: 'Brand3',
Expand Down Expand Up @@ -62,7 +63,7 @@ describe('populateProductProperties', () => {
ItemPrice2: 20,
ItemPromoCode2: 'PromoCode2',
ItemQuantity2: 2,
ItemSku2: 'Sku2',
dummyRHS1: 'DummyValue',
});
});

Expand Down Expand Up @@ -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: [
{
Expand Down

0 comments on commit f89d279

Please sign in to comment.