-
Notifications
You must be signed in to change notification settings - Fork 83
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
[Refactor] SummaryUtil 리팩토링(#723) #756
Conversation
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.
멋진 리팩토링입니다!! 👍
test case에 대한 comment 조금 남겼습니다.~
expect(result[0].summary.content.message).toBe("Initial commit"); | ||
}); | ||
|
||
test("클러스터의 커밋 작성자 이름이 중복되지 않는다.", () => { |
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.
code는 가급적 한글보다는 영어로 작성해주시면 감사하겠습니다!
const isUnique = result | ||
.map((data) => data.summary.authorNames.length === new Set(data.summary.authorNames).size) | ||
.every((value) => value === true); | ||
|
||
expect(isUnique).toBe(true); |
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.
이 부분이 정말 아리까리 하네요.
- 일단 test에 logic이 들어가있어서, 이 isUnique에 대한 test가 또 필요할 것 같아요.
- test에는 가급적 value로 정해주면 좋겠습니다.
- 그리고, 하나의 action(result값)에 대한 assertion만 따로 해서 분리를 했는데, 이럴꺼면 getInitData test에 통합시키는게 맞을 것 같긴 합니다.
// set names | ||
const authorSet: Set<string> = new Set(); | ||
commitNode.commit.author.names.map((name) => { | ||
commitNode.commit.author.names.forEach((name) => { |
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.
👍👍👍
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.
LGTM입니다!!!🙂🙂🙂
@pithesun 님, |
넵 수정해서 오늘중으로 머지하겠습니다!😄 |
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.
LGTM!!
Related issue
#723
Result
getInitData 의 주요 역할이
로 보았는데, 1번에 대한 테스트코드를 추가해보았습니다.
Work list
Discussion