Enhance Beryl Agent detail and report views
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { it, expect } from "vitest";
|
||||
import { parseReviewResult } from "../src/content-review.js";
|
||||
it("fails closed for malformed or contradictory review output", () => {
|
||||
for (const output of ["完成", "{}", '{"passed":"true","reasons":[]}', '{"passed":true,"reasons":["第2页仍是糖果"]}', '{"passed":false,"reasons":[]}'])
|
||||
expect(parseReviewResult(output).passed).toBe(false);
|
||||
});
|
||||
it("accepts only an explicit positive review without failures", () => {
|
||||
expect(parseReviewResult('{"passed":true,"reasons":[]}')).toEqual({ passed: true, reasons: [] });
|
||||
});
|
||||
Reference in New Issue
Block a user