@@ -161,7 +161,7 @@ describe("session cost usage", () => {
161161 } as unknown as OpenClawConfig ;
162162
163163 await withStateDir ( root , async ( ) => {
164- const summary = await loadCostUsageSummary ( { days : 30 , config } ) ;
164+ const summary = await loadCostUsageSummary ( { config } ) ;
165165 // Daily series fills every calendar day in the requested range, even
166166 // days with zero activity, so the chart shows one bar per day.
167167 expect ( summary . daily . length ) . toBe ( summary . days ) ;
@@ -405,7 +405,7 @@ describe("session cost usage", () => {
405405 const costSpy = vi . spyOn ( usageFormat , "resolveModelCostConfig" ) ;
406406 try {
407407 await withStateDir ( root , async ( ) => {
408- const summary = await loadCostUsageSummary ( { days : 30 , config } ) ;
408+ const summary = await loadCostUsageSummary ( { config } ) ;
409409 expect ( summary . totals . totalTokens ) . toBe ( 360 ) ;
410410 expect ( summary . totals . totalCost ) . toBeCloseTo ( 0.0006 , 8 ) ;
411411 } ) ;
@@ -451,7 +451,7 @@ describe("session cost usage", () => {
451451 // not an intentional "free" price.
452452 clearGatewayModelPricingCacheState ( ) ;
453453 await withStateDir ( root , async ( ) => {
454- const summary = await loadCostUsageSummary ( { days : 30 } ) ;
454+ const summary = await loadCostUsageSummary ( ) ;
455455 expect ( summary . totals . totalTokens ) . toBe ( 23287 ) ;
456456 expect ( summary . totals . totalCost ) . toBe ( 0 ) ;
457457 // Unknown pricing must be surfaced as missing rather than reported as a
@@ -511,7 +511,7 @@ describe("session cost usage", () => {
511511
512512 clearGatewayModelPricingCacheState ( ) ;
513513 await withStateDir ( root , async ( ) => {
514- const summary = await loadCostUsageSummary ( { days : 30 , config } ) ;
514+ const summary = await loadCostUsageSummary ( { config } ) ;
515515 expect ( summary . totals . totalTokens ) . toBe ( 23287 ) ;
516516 expect ( summary . totals . totalCost ) . toBe ( 0 ) ;
517517 expect ( summary . totals . missingCostEntries ) . toBe ( 1 ) ;
@@ -1056,7 +1056,7 @@ describe("session cost usage", () => {
10561056 ) ;
10571057
10581058 await withStateDir ( root , async ( ) => {
1059- const summary = await loadCostUsageSummary ( { days : 30 } ) ;
1059+ const summary = await loadCostUsageSummary ( ) ;
10601060 expect ( summary . daily . length ) . toBe ( summary . days ) ;
10611061 const populated = summary . daily . filter ( ( d ) => d . totalTokens > 0 ) ;
10621062 expect ( populated ) . toHaveLength ( 1 ) ;
0 commit comments