mirror of https://github.com/openclaw/openclaw.git
test(pi-tools): use typebox schema fixture
This commit is contained in:
parent
2c636fa3b8
commit
d42c2f6a17
|
|
@ -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(),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue