e5e6de2fad
- Replace bun:test with vitest across all packages - Replace bun build with esbuild - Replace bun:sqlite with better-sqlite3 - Fix OCAS Store API: store.put/get → store.cas.put/get - Fix vitest vi.mock hoisting (vi.hoisted) - Add pnpm-workspace.yaml and pnpm-lock.yaml - Update all package.json test/build scripts WIP: 8 failures remain in agent-hermes (bun engines check + sqlite migration) Refs #26
16 lines
536 B
TypeScript
16 lines
536 B
TypeScript
import { describe, expect, test } from 'vitest';
|
|
import type { LlmToolCall } from "../src/llm/types.js";
|
|
|
|
/** Mirror OpenAI response shape for parser coverage via chatCompletionWithTools integration later. */
|
|
describe("LlmToolCall shape", () => {
|
|
test("tool call record fields", () => {
|
|
const call: LlmToolCall = {
|
|
id: "call_1",
|
|
name: "read_file",
|
|
arguments: '{"path":"README.md"}',
|
|
};
|
|
expect(call.name).toBe("read_file");
|
|
expect(JSON.parse(call.arguments)).toEqual({ path: "README.md" });
|
|
});
|
|
});
|