Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

add agent-voice-chat/tests/unit/providers/index.test.js

overstepping005a7434d968
diff --git a/agent-voice-chat/tests/unit/providers/index.test.js b/agent-voice-chat/tests/unit/providers/index.test.js
new file mode 100644
index 000000000..04ca951b7
--- /dev/null
+++ b/agent-voice-chat/tests/unit/providers/index.test.js
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright 2026 nirholas (https://github.com/nirholas/agent-voice-chat)
+
+describe("Provider factory", () => {
+ beforeEach(() => {
+ vi.resetModules()
+ })
+
+ it("should default to openai-realtime provider", async () => {
+ vi.stubEnv("AI_PROVIDER", "")
+ const { createProvider } = await import("../../../providers/index.js")
+ const provider = createProvider()
+ expect(provider).toBeDefined()
+ expect(provider.type).toBeDefined()
+ })
+
+ it("should export AI_PROVIDER string", async () => {
+ vi.stubEnv("AI_PROVIDER", "claude")
+ const { AI_PROVIDER } = await import("../../../providers/index.js")
+ expect(AI_PROVIDER).toBe("claude")
+ })
+
+ it("should export registerProvider function", async () => {
+ const { registerProvider } = await import("../../../providers/index.js")
+ expect(typeof registerProvider).toBe("function")
+ })
+})