feat: localize quality report
This commit is contained in:
@@ -133,6 +133,27 @@ describe("workflow nodes", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("returns quality report details in Chinese", () => {
|
||||
const report = inspectQuality({
|
||||
article: {
|
||||
title: "Example GEO Optimization Guide",
|
||||
summary: "A factual guide for marketing teams.",
|
||||
body_markdown:
|
||||
"Example Technology Co., Ltd. has eight years of GEO optimization experience.",
|
||||
image_suggestions: [],
|
||||
changed_sections: [],
|
||||
requires_user_confirmation: [],
|
||||
},
|
||||
factCard: confirmedFactCard,
|
||||
platform: "official_site",
|
||||
sourceImages: [],
|
||||
});
|
||||
|
||||
expect(report.checks[0]?.reason).toContain("行业");
|
||||
expect(report.checks[0]?.suggested_fix).toContain("行业");
|
||||
expect(report.checks[0]?.evidence).not.toContain("Article");
|
||||
});
|
||||
|
||||
it("hard-fails incomplete company names, hallucinated numbers, industry drift, and conflicting years", () => {
|
||||
const report = inspectQuality({
|
||||
article: {
|
||||
|
||||
Reference in New Issue
Block a user