-
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
[view] AuthorBarChart util test 코드 작성 #746
Conversation
@@ -87,6 +88,145 @@ describe("getDataByAuthor", () => { | |||
insertion: 3, | |||
deletion: 2, | |||
}, | |||
]); | |||
] as AuthorDataType[]); |
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.
요부분이 type 추가했다고 말씀드린 부분입니다.
}); | ||
}); | ||
|
||
describe("sortDataByName", () => { |
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.
sortDataByName 함수 테스트
}); | ||
}); | ||
|
||
describe("sortDataByAuthor", () => { |
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.
sortDataByAuthor 함수 테스트
}); | ||
}); | ||
|
||
describe("convertNumberFormat", () => { |
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.
convertNumberFormat 함수 테스트
커밋 기록 남는거 혹시 fork하신 레포랑 githru:main이 있는 upstream이랑 싱크가 안맞아서 그런 건 아닐까요? |
오..!. 그런걸까요?.... 항상 pull 받긴 했었는데 어느 순간부터 놓쳤었나봐요 ㅜㅅㅜ 감사합니다!! |
저는 origin에 새로운 브랜치로 만들어서 update하면서 해결하긴 하는데 (git switch -C 활용) |
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.
LGGGGGGGGGGGGGTM!!!!
const result = convertNumberFormat(0.5); | ||
expect(result).toBe("0.5"); | ||
}); | ||
|
||
it("should format numbers greater than 1", () => { | ||
const result = convertNumberFormat(1000); | ||
expect(result).toBe("1k"); |
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.
우왕 심플하지만 세밀한 테스트들 넘 좋습니다!! 👍👍👍👍👍
{ | ||
nodeTypeName: "CLUSTER", | ||
commitNodeList: [ | ||
{ | ||
nodeTypeName: "COMMIT", | ||
commit: { | ||
id: "1", | ||
parentIds: ["0"], | ||
author: { names: ["author1"] }, | ||
committer: { names: ["author1"] }, | ||
authorDate: "2024-01-01T00:00:00Z", | ||
commitDate: "2024-01-01T00:00:00Z", | ||
diffStatistics: { | ||
insertions: 5, | ||
deletions: 3, | ||
}, | ||
message: "Initial commit", | ||
}, | ||
seq: 1, | ||
clusterId: 101, | ||
}, | ||
], |
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.
아래 fakeData를 재활용해도 괜찮을 것 같습니다 : )
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.
엄청 꼼꼼하게 작성해주셨네요!!!!!!
테스트 항목을 자세히 명시해주셔서 이해하기 더 쉬운 것 같아요
참고하겠습니다 🤩🤩👍
Related issue
Result
Work list
sortDataByName: 각각 -1/1/0 return 하는 경우
convertNumberFormat
sortDataByAuthor
Discussion
전부터 왜 자꾸 이전 커밋 기록이 남는건지,, 의문.....입니다 별 문제는 없었긴 한데