@@ -107,13 +107,16 @@ describe("status-runtime-shared", () => {
|
107 | 107 | config: { gateway: {} }, |
108 | 108 | }); |
109 | 109 | |
110 | | -expect(mocks.loadProviderUsageSummary).toHaveBeenCalledWith( |
111 | | -expect.objectContaining({ |
112 | | -timeoutMs: 1234, |
113 | | -config: { gateway: {} }, |
114 | | -agentDir: expect.stringContaining("main"), |
115 | | -}), |
116 | | -); |
| 110 | +const usageCall = mocks.loadProviderUsageSummary.mock.calls[0]?.[0] as |
| 111 | +| { |
| 112 | +timeoutMs?: number; |
| 113 | +config?: unknown; |
| 114 | +agentDir?: string; |
| 115 | +} |
| 116 | +| undefined; |
| 117 | +expect(usageCall?.timeoutMs).toBe(1234); |
| 118 | +expect(usageCall?.config).toEqual({ gateway: {} }); |
| 119 | +expect(usageCall?.agentDir).toContain("main"); |
117 | 120 | }); |
118 | 121 | |
119 | 122 | it("resolves usage summaries with explicit agent scope", async () => { |
@@ -228,13 +231,16 @@ describe("status-runtime-shared", () => {
|
228 | 231 | gatewayService: { label: "LaunchAgent" }, |
229 | 232 | nodeService: { label: "node" }, |
230 | 233 | }); |
231 | | -expect(mocks.loadProviderUsageSummary).toHaveBeenCalledWith( |
232 | | -expect.objectContaining({ |
233 | | -timeoutMs: 1234, |
234 | | -config: { gateway: {} }, |
235 | | -agentDir: expect.stringContaining("main"), |
236 | | -}), |
237 | | -); |
| 234 | +const usageCall = mocks.loadProviderUsageSummary.mock.calls[0]?.[0] as |
| 235 | +| { |
| 236 | +timeoutMs?: number; |
| 237 | +config?: unknown; |
| 238 | +agentDir?: string; |
| 239 | +} |
| 240 | +| undefined; |
| 241 | +expect(usageCall?.timeoutMs).toBe(1234); |
| 242 | +expect(usageCall?.config).toEqual({ gateway: {} }); |
| 243 | +expect(usageCall?.agentDir).toContain("main"); |
238 | 244 | expect(mocks.callGateway).toHaveBeenNthCalledWith(1, { |
239 | 245 | method: "health", |
240 | 246 | params: { probe: true }, |
|