test: tighten voice call empty array assertions

This commit is contained in:
Shakker
2026-05-09 04:39:58 +01:00
parent 9dbbd9b5d4
commit c2f6bb0e71
4 changed files with 8 additions and 8 deletions

View File

@@ -116,7 +116,7 @@ describe("validateProviderConfig", () => {
const result = validateProviderConfig(config);
expect(result.valid).toBe(true);
expect(result.errors).toEqual([]);
expect(result.errors).toStrictEqual([]);
});
it("resolves the Twilio from number from environment", () => {
@@ -219,7 +219,7 @@ describe("validateProviderConfig", () => {
const result = validateProviderConfig(config);
expect(result.valid).toBe(true);
expect(result.errors).toEqual([]);
expect(result.errors).toStrictEqual([]);
});
});
@@ -406,7 +406,7 @@ describe("normalizeVoiceCallConfig", () => {
});
expect(normalized.realtime.instructions).toContain("openclaw_agent_consult");
expect(normalized.tunnel.provider).toBe("none");
expect(normalized.webhookSecurity.allowedHosts).toEqual([]);
expect(normalized.webhookSecurity.allowedHosts).toStrictEqual([]);
});
it("derives the realtime stream path from a custom webhook path", () => {

View File

@@ -575,7 +575,7 @@ describe("processEvent (functional)", () => {
throw new Error("expected retryable error call to remain active");
}
expect(call.state).toBe("active");
expect(Array.from(ctx.processedEventIds)).toEqual([]);
expect(call.processedEventIds).toEqual([]);
expect(Array.from(ctx.processedEventIds)).toStrictEqual([]);
expect(call.processedEventIds).toStrictEqual([]);
});
});

View File

@@ -405,7 +405,7 @@ describe("MediaStreamHandler security hardening", () => {
expect(closed.code).toBe(1008);
expect(closed.reason).toBe("Start timeout");
expect(shouldAcceptStreamCalls).toEqual([]);
expect(shouldAcceptStreamCalls).toStrictEqual([]);
} finally {
await server.close();
}
@@ -912,7 +912,7 @@ describe("MediaStreamHandler security hardening", () => {
const closed = await waitForClose(ws);
expect(closed.code).toBe(1009);
expect(shouldAcceptStreamCalls).toEqual([]);
expect(shouldAcceptStreamCalls).toStrictEqual([]);
} finally {
await server.close();
}

View File

@@ -81,7 +81,7 @@ describe("RealtimeTwilioAudioPacer", () => {
await vi.advanceTimersByTimeAsync(100);
expect(onBackpressure).toHaveBeenCalledOnce();
expect(sent).toEqual([]);
expect(sent).toStrictEqual([]);
});
});