Update tests
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user