




















@@ -106,11 +106,11 @@ function buildCostTotals(overrides: Partial<CostUsageTotals> = {}): CostUsageTot
106106107107function expectSessionCostArgs(): Record<string, unknown> {
108108expect(loadSessionCostSummaryMock).toHaveBeenCalledTimes(1);
109-const call = loadSessionCostSummaryMock.mock.calls.at(0);
109+const call = loadSessionCostSummaryMock.mock.calls[0] as unknown[] | undefined;
110110if (!call) {
111111throw new Error("expected loadSessionCostSummary call");
112112}
113-const args = call.at(0);
113+const args = call[0];
114114if (!args || typeof args !== "object") {
115115throw new Error("expected loadSessionCostSummary args");
116116}
@@ -119,11 +119,11 @@ function expectSessionCostArgs(): Record<string, unknown> {
119119120120function expectFastModeArgs(): Record<string, unknown> {
121121expect(resolveFastModeStateMock).toHaveBeenCalledTimes(1);
122-const call = resolveFastModeStateMock.mock.calls.at(0);
122+const call = resolveFastModeStateMock.mock.calls[0] as unknown[] | undefined;
123123if (!call) {
124124throw new Error("expected resolveFastModeState call");
125125}
126-const args = call.at(0);
126+const args = call[0];
127127if (!args || typeof args !== "object") {
128128throw new Error("expected resolveFastModeState args");
129129}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。