@@ -148,7 +148,7 @@ describe("handleAddAiTokenUsage - Aggregation and Batch Insert", () => {
148148
149149 // Find GPT-4 aggregated record
150150 const gpt4Record = aiTokenUsageInsertCall [ 0 ] . find (
151- ( r : any ) => r . model === "gpt-4" ,
151+ ( r : any ) => r . model === "gpt-4"
152152 ) ;
153153 expect ( gpt4Record ) . toEqual ( {
154154 id : expect . any ( String ) ,
@@ -161,7 +161,7 @@ describe("handleAddAiTokenUsage - Aggregation and Batch Insert", () => {
161161
162162 // Find Claude aggregated record
163163 const claudeRecord = aiTokenUsageInsertCall [ 0 ] . find (
164- ( r : any ) => r . model === "claude-3-opus" ,
164+ ( r : any ) => r . model === "claude-3-opus"
165165 ) ;
166166 expect ( claudeRecord ) . toEqual ( {
167167 id : expect . any ( String ) ,
@@ -313,12 +313,12 @@ describe("handleAddAiTokenUsage - Aggregation and Batch Insert", () => {
313313
314314 // Verify aggregation: should have 2 gpt-4 records and 1 claude record
315315 const gpt4Records = aiTokenUsageInsertCall [ 0 ] . filter (
316- ( r : any ) => r . model === "gpt-4" ,
316+ ( r : any ) => r . model === "gpt-4"
317317 ) ;
318318 expect ( gpt4Records ) . toHaveLength ( 2 ) ;
319319
320320 const claudeRecords = aiTokenUsageInsertCall [ 0 ] . filter (
321- ( r : any ) => r . model === "claude-3-sonnet" ,
321+ ( r : any ) => r . model === "claude-3-sonnet"
322322 ) ;
323323 expect ( claudeRecords ) . toHaveLength ( 1 ) ;
324324
@@ -419,7 +419,7 @@ describe("handleAddAiTokenUsage - Aggregation and Batch Insert", () => {
419419 { id : "user-1" } ,
420420 { id : "user-2" } ,
421421 { id : "user-3" } ,
422- ] ) ,
422+ ] )
423423 ) ;
424424 } ) ;
425425
@@ -491,7 +491,7 @@ describe("handleAddAiTokenUsage - Aggregation and Batch Insert", () => {
491491 mockTransaction . returning . mockResolvedValueOnce ( [ ] ) ;
492492
493493 await expect (
494- handleAddAiTokenUsage ( events , "api-key-123" ) ,
494+ handleAddAiTokenUsage ( events , "api-key-123" )
495495 ) . rejects . toThrow ( "Event insert returned no IDs" ) ;
496496 } ) ;
497497
@@ -527,7 +527,7 @@ describe("handleAddAiTokenUsage - Aggregation and Batch Insert", () => {
527527 mockTransaction . returning . mockResolvedValueOnce ( [ { id : "event-1" } ] ) ;
528528
529529 await expect (
530- handleAddAiTokenUsage ( events , "api-key-123" ) ,
530+ handleAddAiTokenUsage ( events , "api-key-123" )
531531 ) . rejects . toThrow ( "Expected 2 event IDs but got 1" ) ;
532532 } ) ;
533533 } ) ;
@@ -552,7 +552,7 @@ describe("handleAddAiTokenUsage - Aggregation and Batch Insert", () => {
552552 mockDb . transaction . mockRejectedValueOnce ( new Error ( "Transaction failed" ) ) ;
553553
554554 await expect (
555- handleAddAiTokenUsage ( events , "api-key-123" ) ,
555+ handleAddAiTokenUsage ( events , "api-key-123" )
556556 ) . rejects . toThrow ( "Transaction failed" ) ;
557557 } ) ;
558558
@@ -573,11 +573,11 @@ describe("handleAddAiTokenUsage - Aggregation and Batch Insert", () => {
573573 ] ;
574574
575575 mockTransaction . returning . mockRejectedValueOnce (
576- new Error ( "Insert failed" ) ,
576+ new Error ( "Insert failed" )
577577 ) ;
578578
579579 await expect (
580- handleAddAiTokenUsage ( events , "api-key-123" ) ,
580+ handleAddAiTokenUsage ( events , "api-key-123" )
581581 ) . rejects . toThrow ( ) ;
582582 } ) ;
583583 } ) ;
0 commit comments