mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 19:00:38 +09:00
fix execution policy decision persistence
This commit is contained in:
parent
a0333f3e9d
commit
bce58d353d
9 changed files with 160 additions and 34 deletions
|
|
@ -95,6 +95,20 @@ describe("normalizeIssueExecutionPolicy", () => {
|
|||
expect(result!.mode).toBe("normal");
|
||||
});
|
||||
|
||||
it("rejects approvalsNeeded values above 1", () => {
|
||||
expect(() =>
|
||||
normalizeIssueExecutionPolicy({
|
||||
stages: [
|
||||
{
|
||||
type: "review",
|
||||
approvalsNeeded: 2,
|
||||
participants: [{ type: "agent", agentId: qaAgentId }],
|
||||
},
|
||||
],
|
||||
}),
|
||||
).toThrow("Invalid execution policy");
|
||||
});
|
||||
|
||||
it("throws for invalid input", () => {
|
||||
expect(() => normalizeIssueExecutionPolicy({ stages: [{ type: "invalid_type" }] })).toThrow();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue