fix: strengthen qna branch test assertions per review feedback

This commit is contained in:
lda
2026-07-08 07:22:41 +07:00 Verified
parent e311b77137
commit 4b13fb99df
@@ -83,9 +83,11 @@ describe("defense storyboard catalog", () => {
expect(qnaBranches.length).toBeGreaterThanOrEqual(10); expect(qnaBranches.length).toBeGreaterThanOrEqual(10);
for (const branch of qnaBranches) { for (const branch of qnaBranches) {
expect(branch.question).toMatch(/\?$/); expect(branch.question).toMatch(/\?$/);
expect(branch.shortAnswer?.length).toBeGreaterThan(40); expect(branch.shortAnswer).toBeDefined();
expect(branch.shortAnswer?.length).toBeLessThan(360); expect(branch.shortAnswer!.length).toBeGreaterThan(40);
expect(branch.expandedAnswer?.length).toBeGreaterThan(80); expect(branch.shortAnswer!.length).toBeLessThan(360);
expect(branch.expandedAnswer).toBeDefined();
expect(branch.expandedAnswer!.length).toBeGreaterThan(80);
expect(branch.evidencePointer.length).toBeGreaterThan(0); expect(branch.evidencePointer.length).toBeGreaterThan(0);
} }
}); });