-
Notifications
You must be signed in to change notification settings - Fork 1
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
⚙️ MSW Feed, Comment, Like API 등록 #12
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Legitgoons
approved these changes
Apr 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
작업 이유
Feed, Comment, Like API에 대한 Mock API 등록
작업 사항
1️⃣ Feed, Comment, Like API 등록
Wiki API Specification 문서에 업로드 되어있는 API를 기반으로 추가하였습니다.
Like API에 대한 테스트 코드만 추가하였습니다.
좋아요 버튼을 클릭하였을 때의 테스트
좋아요 API 예외 테스트
리뷰어가 중점적으로 확인해야 하는 부분
MSW를 구현한 이유가 FE의 생산성을 향상을 위한 것이기에, 각각의 클래스로 연관성을 고려하여 구현하지 않았습니다. 이 점 유의하여 리뷰해주시면 감사하겠습니다. 😀
발견한 이슈
1️⃣ MSW 요청 지연 처리
API 요청마다 첫 요청은 실패하는 문제가 발생하였습니다. 해당 문제를 확인해보니, 브라우저에 서비스 워커를 등록하는 과정이 비동기 작업이였는데 비동기 처리로 등록해주지 않아서 발생한 문제였습니다.
이에 비동기로 서비스 워커를 시작하도록 수정하였습니다.
2️⃣ Strict Mode 제거
API 요청시 StrictMode로 인해 불 필요한 요청이 발생하여 제거하였습니다.