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(bezier-react): Improved array test coverage #1775

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

SEOKKAMONI
Copy link
Contributor

@SEOKKAMONI SEOKKAMONI commented Dec 4, 2023

Self Checklist

  • I wrote a PR title in English and added an appropriate label to the PR.
  • I wrote the commit message in English and to follow the Conventional Commits specification.
  • I added the changeset about the changes that needed to be released. (or didn't have to)
  • I wrote or updated documentation related to the changes. (or didn't have to)
  • I wrote or updated tests related to the changes. (or didn't have to)
  • I tested the changes in various browsers. (or didn't have to)
    • Windows: Chrome, Edge, (Optional) Firefox
    • macOS: Chrome, Edge, Safari, (Optional) Firefox

Related Issue

Summary

  • changed isLastIndex -> isArrayLastIndex
  • Improved array test coverage

Details

TO-BE

image

AS-IS

image

Breaking change? (Yes/No)

References

Copy link

changeset-bot bot commented Dec 4, 2023

⚠️ No Changeset found

Latest commit: 432ef4f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9b76e0f) 87.47% compared to head (432ef4f) 87.47%.

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.
📢 Have feedback on the report? Share it here.

@SEOKKAMONI SEOKKAMONI force-pushed the feat/array-test branch 2 times, most recently from 804d66e to 4ccf74d Compare December 4, 2023 11:41
@sungik-choi sungik-choi added the test Issue or PR that related to test label Dec 4, 2023
.changeset/metal-poets-suffer.md Outdated Show resolved Hide resolved
Comment on lines 3 to 5
export function isLastArrayIndex(array: any[], index: number) {
return array.length - 1 === index
}
Copy link
Contributor

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 라는 이름이 더 적절하지 않을까 생각이 드는데, 의견이 궁금합니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

앗 유사 배열까지는 생각을 못 했던 것 같아요! 그러면 isLastIndex가 맞을 것 같아요 좋은 의견 감사합니다~

Copy link
Contributor Author

@SEOKKAMONI SEOKKAMONI Dec 5, 2023

Choose a reason for hiding this comment

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

네이밍 롤백 타입 변경 두개의 커밋으로 나눠서 반영하였습니다~

@SEOKKAMONI
Copy link
Contributor Author

@yangwooseong 해당 PR도 머지 부탁드립니다!

@sungik-choi sungik-choi merged commit 84e4bd5 into channel-io:main Dec 7, 2023
5 checks passed
Copy link
Contributor

github-actions bot commented Dec 7, 2023

Chromatic Report

🚀 Congratulations! Your build was successful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issue or PR that related to test
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants