@@ -235,10 +235,11 @@ describe("voice-call outbound helpers", () => {
|
235 | 235 | inlineTwiml: undefined, |
236 | 236 | preConnectTwiml: "<DtmfRedirect />", |
237 | 237 | }); |
238 | | -expect(ctx.activeCalls.get(callId)?.metadata).toMatchObject({ |
239 | | -initialMessage: "hello meet", |
240 | | -mode: "conversation", |
241 | | -}); |
| 238 | +const metadata = ( |
| 239 | +ctx.activeCalls.get(callId) as { metadata?: Record<string, unknown> } | undefined |
| 240 | +)?.metadata; |
| 241 | +expect(metadata?.initialMessage).toBe("hello meet"); |
| 242 | +expect(metadata?.mode).toBe("conversation"); |
242 | 243 | }); |
243 | 244 | |
244 | 245 | it("rejects DTMF sequences outside conversation mode", async () => { |
@@ -448,7 +449,7 @@ describe("voice-call outbound helpers", () => {
|
448 | 449 | providerCallId: "provider-1", |
449 | 450 | reason: "hangup-bot", |
450 | 451 | }); |
451 | | -expect(call).toMatchObject({ endReason: "hangup-bot" }); |
| 452 | +expect((call as { endReason?: string }).endReason).toBe("hangup-bot"); |
452 | 453 | const endedAt = (call as { endedAt?: unknown }).endedAt; |
453 | 454 | expect(endedAt).toBeTypeOf("number"); |
454 | 455 | if (typeof endedAt === "number") { |
@@ -482,7 +483,7 @@ describe("voice-call outbound helpers", () => {
|
482 | 483 | providerCallId: "provider-1", |
483 | 484 | reason: "timeout", |
484 | 485 | }); |
485 | | -expect(call).toMatchObject({ endReason: "timeout" }); |
| 486 | +expect((call as { endReason?: string }).endReason).toBe("timeout"); |
486 | 487 | const endedAt = (call as { endedAt?: unknown }).endedAt; |
487 | 488 | expect(endedAt).toBeTypeOf("number"); |
488 | 489 | if (typeof endedAt === "number") { |
|