Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/shared/schemas/playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const PlaygroundPresetRowSchema = z.object({
params_json: z.string(), // JSON serializado (parsed na rota)
created_at: z.string().datetime(),
});
export type PlaygroundPresetRow = z.infer<typeof PlaygroundPresetRowSchema>;

/** Body de POST /api/playground/presets. */
export const PlaygroundPresetCreateSchema = z.object({
Expand Down
10 changes: 10 additions & 0 deletions tests/unit/playground-schemas.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ const {
StreamMetricsSchema,
} = await import("../../src/shared/schemas/playground.ts");

test("playground schema module keeps runtime schemas exported", () => {
assert.equal(typeof PlaygroundPresetRowSchema.safeParse, "function");
assert.equal(typeof PlaygroundPresetCreateSchema.safeParse, "function");
assert.equal(typeof PlaygroundPresetUpdateSchema.safeParse, "function");
assert.equal(typeof PlaygroundPresetListItemSchema.safeParse, "function");
assert.equal(typeof ToolDefinitionSchema.safeParse, "function");
assert.equal(typeof StructuredOutputSchema.safeParse, "function");
assert.equal(typeof StreamMetricsSchema.safeParse, "function");
});

// ── PlaygroundPresetRowSchema ──────────────────────────────────────────────────

test("PlaygroundPresetRowSchema: valid row parses correctly", () => {
Expand Down
Loading