Skip to content

Commit

Permalink
Merge pull request #54 from boostcampwm-2024/fix/post-card-type-hotfix
Browse files Browse the repository at this point in the history
🐛 fix: 테스트에서 포스트 카드 타입변경으로 인해 발생한 버그 수정
  • Loading branch information
jungmyunggi authored Feb 13, 2025
2 parents b22ddcc + c9b9333 commit d6f1016
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions client/src/__tests__/components/common/Card/PostCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ describe("PostCard", () => {
viewCount: 100,
path: "/test-post",
author: "작성자",
thumbnail: "",
blogPlatform: "etc",
tag: ["JavaScript", "React"],
summary: "# test",
};

render(<PostCard post={minimalPost} />);
Expand Down
3 changes: 2 additions & 1 deletion client/src/__tests__/mocks/data/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export const createMockPost = (override = {}) => ({
author: "작성자",
thumbnail: "test-thumbnail.jpg",
authorImageUrl: "author-image.jpg",
tags: ["React", "Testing"],
tag: ["React", "Testing"],
likes: 50,
blogPlatform: "etc",
summary: "# test",
...override,
});

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/common/Card/PostCardContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const DesktopCardContent = ({ post }: PostCardContentProps) => {
<p className="h-[40px] font-bold text-sm group-hover:text-primary transition-colors line-clamp-2">
{post.title}
</p>
<p className="text-[10px] text-gray-400 pt-2">{formatDate(post.createdAt)}</p>
<p className="text-[10px] text-gray-400 pt-2 pb-1">{formatDate(post.createdAt)}</p>
{post.tag && <PostTag tags={post.tag} />}
</div>
</CardContent>
Expand Down

0 comments on commit d6f1016

Please sign in to comment.