Skip to content

Conversation

wo-o29
Copy link
Contributor

@wo-o29 wo-o29 commented Oct 9, 2025

Summary

Improved the takeRight function implementation to achieve 100% branch coverage and remove unnecessary defensive code.

Before After
스크린샷 2025-10-09 오후 11 59 13 스크린샷 2025-10-09 오후 11 59 38

Changes

  • Changed count parameter from default value count = 1 to optional count?: number to eliminate redundant initialization logic
  • Improved test coverage from 90% to 100% in the Branch category by removing duplicate initialization paths
  • Removed unnecessary arr == null check since the type signature readonly T[] already prevents null/undefined at compile time

@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 15:16
Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
es-toolkit Ready Ready Preview Comment Oct 9, 2025 3:34pm

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.90%. Comparing base (21bd853) to head (231720c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1451   +/-   ##
=======================================
  Coverage   99.90%   99.90%           
=======================================
  Files         468      468           
  Lines        4439     4439           
  Branches     1309     1308    -1     
=======================================
  Hits         4435     4435           
  Misses          4        4           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sukvvon
Copy link
Contributor

sukvvon commented Oct 9, 2025

Hello! @wo-o29 I've created a PR(#1452) for what you were concerned about! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants