Skip to content

Commit ab0094c

Browse files
committed
fix(voicecall): make status assertion lint-safe
1 parent 06d8b8b commit ab0094c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

extensions/voice-call/index.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,9 @@ describe("voice-call plugin", () => {
550550
const [ok, payload] = firstRespondCall(respond);
551551
expect(ok).toBe(true);
552552
expect(payload?.found).toBe(true);
553-
expect(payload?.calls).toHaveLength(1);
554-
expectRedactedVoiceCallStatus((payload?.calls as unknown[])[0]);
553+
const calls = (payload?.calls as unknown[] | undefined) ?? [];
554+
expect(calls).toHaveLength(1);
555+
expectRedactedVoiceCallStatus(calls[0]);
555556
});
556557

557558
it("sends DTMF via voicecall.dtmf", async () => {

0 commit comments

Comments
 (0)