Update tests

This commit is contained in:
adilallo
2025-09-30 15:30:02 -06:00
parent b15f913a14
commit e11f333915
63 changed files with 55920 additions and 7 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ describe("ContentBanner", () => {
// Should use thumbnail.horizontal for md+ breakpoint
const mdBackgroundDiv = document.querySelector(
"div[style*='test-article-horizontal.svg']"
"div[style*='test-article-horizontal.svg'][class*='md:block']"
);
expect(mdBackgroundDiv).toBeInTheDocument();
expect(mdBackgroundDiv).toHaveClass("hidden", "md:block");
+7 -1
View File
@@ -85,7 +85,13 @@ describe("Blog Post Validation", () => {
};
const sanitized = sanitizeBlogPost(post);
expect(sanitized).toEqual(post);
// The sanitized version will have null values for optional fields that weren't provided
expect(sanitized).toEqual({
...post,
thumbnail: null,
banner: null,
background: null,
});
});
it("should add default values for missing optional fields", () => {