fix: Update lock file in the action dir due to #118.

This commit is contained in:
Robin Tail
2026-01-20 06:47:27 +00:00
committed by pullfrog[bot]
parent ce123c9a57
commit cfd7f45db9
14 changed files with 2099 additions and 2 deletions
+32 -1
View File
@@ -1,4 +1,4 @@
import { Inputs } from "./payload.ts";
import { Inputs, JsonPayload } from "./payload.ts";
describe("Inputs schema", () => {
it("only prompt is required", () => {
@@ -43,3 +43,34 @@ describe("Inputs schema", () => {
}
);
});
describe("JsonPayload schema", () => {
it("requires ~pullfrog and version", () => {
const result = JsonPayload.assert({ "~pullfrog": true, version: "1.2.3" });
expect(result).toMatchObject({ "~pullfrog": true, version: "1.2.3" });
expect(() => JsonPayload.assert({})).toThrow();
expect(() => JsonPayload.assert({ "~pullfrog": true })).toThrow();
expect(() => JsonPayload.assert({ version: "1.2.3" })).toThrow();
});
it.each([
["prompt", "test prompt"],
["agent", "claude"],
["agent", "codex"],
["agent", "cursor"],
["agent", "gemini"],
["agent", "opencode"],
["effort", "mini"],
["effort", "auto"],
["effort", "max"],
["event", { trigger: "unknown" }],
] as const)("should accept optional %s with value %s", (prop, value) => {
const input = { "~pullfrog": true, version: "1.2.3", [prop]: value };
expect(() => JsonPayload.assert(input)).not.toThrow();
});
it.each([["agent"], ["effort"]] as const)("should reject invalid %s values", (prop) => {
const input = { "~pullfrog": true, version: "1.2.3", [prop]: "invalid" as any };
expect(() => JsonPayload.assert(input)).toThrow();
});
});