Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ test: 최신 피드 업데이트 API 테스트 코드 작성 #282

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

CodeVac513
Copy link
Collaborator

🔨 테스크

Issue

📋 작업 내용

  • 최신 게시글 실시간 업데이트 API 테스트 코드 작성
  • redis가 제대로 동작하지 않는 버그가 있었는데, 하드웨어 이슈인 것 같습니다. 컴퓨터를 껐다 켰더니 정상 동작하네요.
  • 이외에도 RssFixutre를 잘못 의존하던 부분을 RssAcceptFixture를 의존하도록 변경했습니다.

📷 스크린 샷

image

@CodeVac513 CodeVac513 added the ✅ Test 테스트 관련 (storybook, vitest, jest 등) label Dec 3, 2024
@CodeVac513 CodeVac513 self-assigned this Dec 3, 2024
Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for denamu canceled.

Name Link
🔨 Latest commit 2ea6002
🔍 Latest deploy log https://app.netlify.com/sites/denamu/deploys/674fb703592cff0008d7a9c7

@CodeVac513 CodeVac513 changed the title Test/read recent feed api test ✅ test: 최신 피드 업데이트 API 테스트 코드 작성 Dec 4, 2024
Copy link
Collaborator

@Jo-Minseok Jo-Minseok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@CodeVac513
Copy link
Collaborator Author

CodeVac513 commented Dec 4, 2024

const baseDate = new Date();
    for (let i = 0; i < 2; i++) {
      const date = new Date(baseDate);
      date.setHours(date.getHours() + i);
      feedList.push(
        FeedFixture.createFeedFixture(blog, { createdAt: date }, i + 1),
      );
    }

위와 같이 코드를 수정해서 date(시간) 순으로 정렬이 잘 이루어지도록 수정했습니다.
테스트 실행해보니 통과하네요.

@CodeVac513 CodeVac513 merged commit 618c87c into main Dec 4, 2024
1 check passed
@CodeVac513 CodeVac513 deleted the test/read-recent-feed-api-test branch December 4, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Test 테스트 관련 (storybook, vitest, jest 등)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] Polling으로 최신 포스트 실시간 전송 API 구현
2 participants