-
Notifications
You must be signed in to change notification settings - Fork 48
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(bezier-react): Improved array
test coverage
#1775
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1775 +/- ##
=======================================
Coverage 87.47% 87.47%
=======================================
Files 282 282
Lines 3959 3959
Branches 826 826
=======================================
Hits 3463 3463
Misses 424 424
Partials 72 72 ☔ View full report in Codecov by Sentry. |
804d66e
to
4ccf74d
Compare
cc015fc
to
1db1a0f
Compare
export function isLastArrayIndex(array: any[], index: number) { | ||
return array.length - 1 === index | ||
} |
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.
export function isLastIndex(array: ArrayLike<unknown>, index: number) {
return array.length - 1 === index
}
이 PR의 범위는 아니지만, 지금보니 이 타입이 더 정확하겠네요 😅 유사배열도 length 프로퍼티를 가지고 있으니까요. 이렇게 변경할 경우 isLastIndex
라는 이름이 더 적절하지 않을까 생각이 드는데, 의견이 궁금합니다.
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.
앗 유사 배열까지는 생각을 못 했던 것 같아요! 그러면 isLastIndex가 맞을 것 같아요 좋은 의견 감사합니다~
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.
@yangwooseong 해당 PR도 머지 부탁드립니다! |
Chromatic Report🚀 Congratulations! Your build was successful! |
Self Checklist
Related Issue
Summary
array
test coverageDetails
TO-BE
AS-IS
Breaking change? (Yes/No)
References