diff options
| author | polwex <polwex@sortug.com> | 2025-07-23 07:25:56 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-07-23 07:25:56 +0700 |
| commit | de917196d3602197a90e9eaa7cf7f8b5d0c7718e (patch) | |
| tree | 2bd3bf4de9c9e2fc910bfd04868330f3f78fe0a7 /tests/index.test.ts | |
| parent | e1e01fe1c702e33509a276eb1da6efc720c21164 (diff) | |
m
Diffstat (limited to 'tests/index.test.ts')
| -rw-r--r-- | tests/index.test.ts | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/index.test.ts b/tests/index.test.ts new file mode 100644 index 0000000..1c328fa --- /dev/null +++ b/tests/index.test.ts @@ -0,0 +1,61 @@ +import { describe, expect, test } from "bun:test"; +import selectModel from "../index"; + +describe("Model selector smoke tests", () => { + // test("chatgpt model instantiates correctly and basic send works", async () => { + // const api = selectModel({ chatgpt: "" }); + // expect(api).toBeDefined(); + // expect(typeof api.send).toBe("function"); + // expect(typeof api.stream).toBe("function"); + // expect(typeof api.setModel).toBe("function"); + // expect(typeof api.tokenizer).toBe("function"); + // expect(typeof api.maxTokens).toBe("number"); + // const res = await api.send("hello"); + // expect(res).toBeTruthy(); + // expect(typeof (res.ok ?? res.error)).toBe("string"); + // }); + // test("gemini model instantiates correctly and basic send works", async () => { + // const api = selectModel({ gemini: "" }); + // expect(api).toBeDefined(); + // expect(typeof api.send).toBe("function"); + // expect(typeof api.stream).toBe("function"); + // const res = await api.send("hello"); + // console.log({ res }); + // }); + // test("claude model instantiates correctly and basic send works", async () => { + // const api = selectModel({ claude: "" }); + // expect(api).toBeDefined(); + // expect(typeof api.send).toBe("function"); + // expect(typeof api.stream).toBe("function"); + // const res = await api.send("hello"); + // expect(res).toBeTruthy(); + // expect(typeof (res.ok ?? res.error)).toBe("string"); + // }); + // test("deepseek model instantiates correctly and basic send works", async () => { + // const api = selectModel({ deepseek: "" }); + // expect(api).toBeDefined(); + // expect(typeof api.send).toBe("function"); + // expect(typeof api.stream).toBe("function"); + // const res = await api.send("hello"); + // expect(res).toBeTruthy(); + // expect(typeof (res.ok ?? res.error)).toBe("string"); + // }); + // test("kimi model instantiates correctly and basic send works", async () => { + // const api = selectModel({ kimi: "" }); + // expect(api).toBeDefined(); + // expect(typeof api.send).toBe("function"); + // expect(typeof api.stream).toBe("function"); + // const res = await api.send("hello"); + // expect(res).toBeTruthy(); + // expect(typeof (res.ok ?? res.error)).toBe("string"); + // }); + // test("grok model instantiates correctly and basic send works", async () => { + // const api = selectModel({ grok: "" }); + // expect(api).toBeDefined(); + // expect(typeof api.send).toBe("function"); + // expect(typeof api.stream).toBe("function"); + // const res = await api.send("hello"); + // expect(res).toBeTruthy(); + // expect(typeof (res.ok ?? res.error)).toBe("string"); + // }); +}); |
