Skip to content

Commit 0dcccd5

Browse files
committed
docs: Add clarifying comments about dummy filename requirement
Explain why posts with external_url need a dummy filename field for backend compatibility with social_card_tags.py
1 parent aa4837d commit 0dcccd5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/__tests__/posts/postsValidation.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ describe("posts.json validation", () => {
1313
test("posts with external_url should still have filename for backend compatibility", () => {
1414
// This test ensures backend social_card_tags.py won't crash
1515
// The backend expects all posts to have a filename field
16+
// Posts with external_url should have a dummy filename (e.g., "obbba-household-by-household-dummy.md")
17+
// The actual file doesn't need to exist - it's just for backend compatibility
1618
const postsWithExternalUrl = posts.filter((post) => post.external_url);
1719

1820
postsWithExternalUrl.forEach((post) => {
19-
// This should fail for the OBBBA post which only has external_url
21+
// Posts with external_url must have a filename field to prevent backend crash
2022
expect(post.filename).toBeDefined();
2123
});
2224
});

0 commit comments

Comments
 (0)