Skip to content

Commit d6f1016

Browse files
authored
Merge pull request #54 from boostcampwm-2024/fix/post-card-type-hotfix
🐛 fix: 테스트에서 포스트 카드 타입변경으로 인해 발생한 버그 수정
2 parents b22ddcc + c9b9333 commit d6f1016

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

client/src/__tests__/components/common/Card/PostCard.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ describe("PostCard", () => {
6060
viewCount: 100,
6161
path: "/test-post",
6262
author: "작성자",
63+
thumbnail: "",
6364
blogPlatform: "etc",
65+
tag: ["JavaScript", "React"],
66+
summary: "# test",
6467
};
6568

6669
render(<PostCard post={minimalPost} />);

client/src/__tests__/mocks/data/posts.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ export const createMockPost = (override = {}) => ({
77
author: "작성자",
88
thumbnail: "test-thumbnail.jpg",
99
authorImageUrl: "author-image.jpg",
10-
tags: ["React", "Testing"],
10+
tag: ["React", "Testing"],
1111
likes: 50,
1212
blogPlatform: "etc",
13+
summary: "# test",
1314
...override,
1415
});
1516

client/src/components/common/Card/PostCardContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const DesktopCardContent = ({ post }: PostCardContentProps) => {
5454
<p className="h-[40px] font-bold text-sm group-hover:text-primary transition-colors line-clamp-2">
5555
{post.title}
5656
</p>
57-
<p className="text-[10px] text-gray-400 pt-2">{formatDate(post.createdAt)}</p>
57+
<p className="text-[10px] text-gray-400 pt-2 pb-1">{formatDate(post.createdAt)}</p>
5858
{post.tag && <PostTag tags={post.tag} />}
5959
</div>
6060
</CardContent>

0 commit comments

Comments
 (0)