test(pi-tools): use typebox schema fixture

This commit is contained in:
Peter Steinberger 2026-03-28 05:53:15 +00:00
parent 2c636fa3b8
commit d42c2f6a17
1 changed files with 5 additions and 15 deletions

View File

@ -1,4 +1,5 @@
import type { AgentTool } from "@mariozechner/pi-agent-core";
import { Type } from "@sinclair/typebox";
import { describe, expect, it, vi } from "vitest";
import { normalizeToolParameters } from "./pi-tools.schema.js";
@ -8,21 +9,10 @@ describe("normalizeToolParameters", () => {
name: "demo",
label: "demo",
description: "demo",
parameters: {
type: "object",
properties: {
count: {
type: "integer",
minimum: 1,
maximum: 5,
},
query: {
type: "string",
minLength: 2,
},
},
required: ["count"],
},
parameters: Type.Object({
count: Type.Integer({ minimum: 1, maximum: 5 }),
query: Type.Optional(Type.String({ minLength: 2 })),
}),
execute: vi.fn(),
};