Refine use cases rule examples

This commit is contained in:
adilallo committed 2026-05-19 22:16:08 -06:00
1 parent 7c46cbd87b
commit 2f2b5d0dc2
65 files changed
+3129 -252

No files matched your search

+34
View File
@@ -314,6 +314,40 @@ describe("parseDocumentSectionsForDisplay", () => {
expect(parseDocumentSectionsForDisplay(doc)).toEqual(doc.sections);
});
it("accepts entries with labeled blocks and omits body in JSON (normalized to \"\")", () => {
const doc = {
sections: [
{
categoryName: "Membership",
entries: [
{
title: "Open membership",
blocks: [
{ label: "Eligibility", body: "Anyone may join." },
{ label: "Process", body: "Sign the sheet." },
],
},
],
},
],
};
expect(parseDocumentSectionsForDisplay(doc)).toEqual([
{
categoryName: "Membership",
entries: [
{
title: "Open membership",
body: "",
blocks: [
{ label: "Eligibility", body: "Anyone may join." },
{ label: "Process", body: "Sign the sheet." },
],
},
],
},
]);
});
it("accepts entries with labeled blocks and empty body", () => {
const doc = {
sections: [