@@ -661,11 +661,9 @@ describe('Kilo Pass Impact referral conversions', () => {
661661 expect ( await db . select ( ) . from ( impact_referral_rewards ) ) . toHaveLength ( 0 ) ;
662662 } ) ;
663663
664- test ( 'renewal, prior subscription, deleted tombstone, and self-referral do not grant rewards' , async ( ) => {
665- const cases = [ 'renewal' , 'prior_subscription' , 'deleted_tombstone' , 'self_referral' ] as const ;
666-
667- for ( const scenario of cases ) {
668- await cleanupDbForTest ( ) ;
664+ test . each ( [ 'renewal' , 'prior_subscription' , 'deleted_tombstone' , 'self_referral' ] as const ) (
665+ '%s does not grant referral rewards' ,
666+ async scenario => {
669667 const referrer = await insertTestUser ( { created_at : '2025-12-01T00:00:00.000Z' } ) ;
670668 const referee =
671669 scenario === 'self_referral'
@@ -696,11 +694,11 @@ describe('Kilo Pass Impact referral conversions', () => {
696694
697695 const disposition = await processInvoice ( { refereeId : referee . id , subscriptionId } ) ;
698696 const rewards = await db . select ( ) . from ( impact_referral_rewards ) ;
699- expect ( { scenario , rewardCount : rewards . length } ) . toEqual ( { scenario , rewardCount : 0 } ) ;
697+ expect ( rewards ) . toHaveLength ( 0 ) ;
700698 expect ( disposition . winningTouchType ) . toBe ( ImpactReferralWinningTouchType . Referral ) ;
701699 expect ( disposition . disqualificationReason ) . toMatch ( / ^ r e f e r r a l _ / ) ;
702700 }
703- } ) ;
701+ ) ;
704702
705703 test ( 'referrer cap limits only referrer reward and invoice retry is idempotent' , async ( ) => {
706704 const referrer = await insertTestUser ( { created_at : '2025-12-01T00:00:00.000Z' } ) ;
0 commit comments