@@ -158,7 +158,8 @@ describe('[ADR-0142 D7] the queue recipient', () => {
158158 */
159159describe ( '[ADR-0142 D7] a failed queue-member read keeps the queue-recipient rule\'s grants (#29604)' , ( ) => {
160160 let engine : ReturnType < typeof makeEngine > ;
161- let warn : ReturnType < typeof vi . fn > ;
161+ type Warn = ( msg : string , meta ?: Record < string , any > ) => void ;
162+ let warn : ReturnType < typeof vi . fn < Warn > > ;
162163 let rules : SharingRuleService ;
163164 const REFUSAL = / \[ q u e u e \] q u e u e ' b i l l i n g ' i n o r g a n i z a t i o n ' o r g _ a ' d o e s n o t a n s w e r i t s m e m b e r s , b e c a u s e a r e a d b e h i n d i t f a i l e d / ;
164165 const granteesOf = ( recordId : string ) : string [ ] =>
@@ -183,14 +184,14 @@ describe('[ADR-0142 D7] a failed queue-member read keeps the queue-recipient rul
183184 { id : 'qm_2' , queue : 'billing' , recipient_type : 'team' , recipient_id : 't_night' , organization_id : 'org_a' } ,
184185 ] ) ;
185186 engine . seed ( 'sys_team_member' , [ { id : 'tm_1' , team_id : 't_night' , user_id : 'u_d' } ] ) ;
186- warn = vi . fn ( ) ;
187- const logger = { warn, info : vi . fn ( ) , debug : vi . fn ( ) , error : vi . fn ( ) } ;
187+ warn = vi . fn < Warn > ( ) ;
188+ const logger = { warn, info : vi . fn < Warn > ( ) } ;
188189 const queues = new OwnershipQueueService ( { engine : ( ) => engine as any , logger } ) ;
189190 rules = new SharingRuleService ( {
190191 engine : engine as any ,
191192 sharing : new SharingService ( { engine : engine as any } ) ,
192193 ownershipQueues : ( ) => queues ,
193- logger : logger as any ,
194+ logger,
194195 } ) ;
195196 await rules . evaluateRule ( RULE , SYS ) ;
196197 expect ( granteesOf ( 'inv1' ) ) . toEqual ( [ 'u_c' , 'u_d' ] ) ;
0 commit comments