Skip to content

test: add edge case coverage for Array.prototype.find#5221

Merged
hansl merged 5 commits intoboa-dev:mainfrom
ParthMozarkar:test-array-find-edge-cases
Mar 22, 2026
Merged

test: add edge case coverage for Array.prototype.find#5221
hansl merged 5 commits intoboa-dev:mainfrom
ParthMozarkar:test-array-find-edge-cases

Conversation

@ParthMozarkar
Copy link
Contributor

I added test cases for Array.prototype.find covering edge cases that
weren't tested before:

  • Empty array returns undefined
  • No match returns undefined
  • Returns first match not last
  • Works correctly with objects
  • Callback receives correct index
  • Sparse array holes are visited

No existing tests were removed or modified.

@ParthMozarkar ParthMozarkar requested a review from a team as a code owner March 22, 2026 11:19
@github-actions github-actions bot added Waiting On Review Waiting on reviews from the maintainers C-Tests Issues and PRs related to the tests. and removed Waiting On Review Waiting on reviews from the maintainers labels Mar 22, 2026
@github-actions github-actions bot added this to the v1.0.0 milestone Mar 22, 2026
@github-actions github-actions bot added Waiting On Review Waiting on reviews from the maintainers C-Builtins PRs and Issues related to builtins/intrinsics labels Mar 22, 2026
@ParthMozarkar ParthMozarkar force-pushed the test-array-find-edge-cases branch from 6ee9fc6 to 431ba88 Compare March 22, 2026 19:22
@hansl hansl enabled auto-merge March 22, 2026 19:29
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,545 50,545 0
Ignored 1,426 1,426 0
Failed 992 992 0
Panics 2 2 0
Conformance 95.43% 95.43% 0.00%

Tested main commit: 0592ecc32629c18d43dc136b6675ef980f37a061
Tested PR commit: 431ba88e8c62ea2eefd85a02539a2014822cad1f
Compare commits: 0592ecc...431ba88

@hansl hansl added this pull request to the merge queue Mar 22, 2026
@codecov
Copy link

codecov bot commented Mar 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.79%. Comparing base (6ddc2b4) to head (431ba88).
⚠️ Report is 917 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5221       +/-   ##
===========================================
+ Coverage   47.24%   59.79%   +12.55%     
===========================================
  Files         476      582      +106     
  Lines       46892    63460    +16568     
===========================================
+ Hits        22154    37948    +15794     
- Misses      24738    25512      +774     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

Merged via the queue into boa-dev:main with commit 66a1cd2 Mar 22, 2026
22 checks passed
@github-actions github-actions bot removed the Waiting On Review Waiting on reviews from the maintainers label Mar 22, 2026
@jedel1043 jedel1043 added the A-Internal Changes that don't modify execution behaviour label Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Internal Changes that don't modify execution behaviour C-Builtins PRs and Issues related to builtins/intrinsics C-Tests Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants