@@ -13,21 +13,21 @@ import {
1313 } ) ;
1414
1515 it ( 'should save products to localStorage when noTargeting is false by default' , ( ) => {
16- const product = { Name : 'iphone' , Sku : 'iphonesku' , Price : 599 , Quantity : 1 } ;
16+ const product : Partial < Product > = { Name : 'iphone' , Sku : 'iphonesku' , Price : 599 , Quantity : 1 } ;
1717 mpInstance . _Persistence . setCartProducts ( { [ testMPID ] : { cp : [ product ] } } as unknown as Product [ ] ) ;
1818 expect ( mpInstance . _Persistence . getCartProducts ( testMPID ) . length ) . toBe ( 1 ) ;
1919 } ) ;
2020
2121 it ( 'should NOT save products to localStorage when noTargeting is true' , ( ) => {
2222 mpInstance . _Store . setNoTargeting ( true ) ;
23- const product = { Name : 'iphone' , Sku : 'iphonesku' , Price : 599 , Quantity : 1 } ;
23+ const product : Partial < Product > = { Name : 'iphone' , Sku : 'iphonesku' , Price : 599 , Quantity : 1 } ;
2424 mpInstance . _Persistence . setCartProducts ( { [ testMPID ] : { cp : [ product ] } } as unknown as Product [ ] ) ;
2525 expect ( mpInstance . _Persistence . getCartProducts ( testMPID ) . length ) . toBe ( 0 ) ;
2626 } ) ;
2727
2828 it ( 'should save products to localStorage when noTargeting is false' , ( ) => {
2929 mpInstance . _Store . setNoTargeting ( false ) ;
30- const product = { Name : 'iphone' , Sku : 'iphonesku' , Price : 599 , Quantity : 1 } ;
30+ const product : Partial < Product > = { Name : 'iphone' , Sku : 'iphonesku' , Price : 599 , Quantity : 1 } ;
3131 mpInstance . _Persistence . setCartProducts ( { [ testMPID ] : { cp : [ product ] } } as unknown as Product [ ] ) ;
3232 expect ( mpInstance . _Persistence . getCartProducts ( testMPID ) . length ) . toBe ( 1 ) ;
3333 } ) ;
0 commit comments