Skip to content

test(encode): use existing strRepeat from string utilities instead of redefining it#524

Merged
nev21 merged 2 commits intonev21/encodefrom
copilot/sub-pr-523
Feb 26, 2026
Merged

test(encode): use existing strRepeat from string utilities instead of redefining it#524
nev21 merged 2 commits intonev21/encodefrom
copilot/sub-pr-523

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

The encode test file had a locally defined strRepeat helper that duplicated the already-exported strRepeat from src/string/repeat.

Changes

  • Removed local strRepeat function definition from encode.test.ts
  • Added import of strRepeat from ../../../../src/string/repeat

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Copilot AI changed the title [WIP] Work in progress on feedback for encoding utilities test(encode): use existing strRepeat from string utilities instead of redefining it Feb 26, 2026
@nev21 nev21 marked this pull request as ready for review February 26, 2026 05:53
@nev21 nev21 requested review from a team as code owners February 26, 2026 05:53
Copilot AI review requested due to automatic review settings February 26, 2026 05:53
@nev21 nev21 merged commit 5891117 into nev21/encode Feb 26, 2026
5 checks passed
@nev21 nev21 deleted the copilot/sub-pr-523 branch February 26, 2026 05:53
Copy link
Contributor

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.

Pull request overview

This PR eliminates code duplication in the test suite by removing a locally-defined helper function that already exists as a well-tested utility in the library.

Changes:

  • Removed the local strRepeat helper function from encode.test.ts (9 lines)
  • Added import statement to use the existing strRepeat utility from src/string/repeat

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.78%. Comparing base (b2ff691) to head (15d3702).
⚠️ Report is 1 commits behind head on nev21/encode.

Additional details and impacted files
@@              Coverage Diff              @@
##           nev21/encode     #524   +/-   ##
=============================================
  Coverage         98.78%   98.78%           
=============================================
  Files               111      111           
  Lines              3384     3384           
  Branches            738      738           
=============================================
  Hits               3343     3343           
  Misses               41       41           
🚀 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.

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