Skip to content

Implement Iterator.prototype.includes proposal#5227

Open
nekevss wants to merge 7 commits intoboa-dev:mainfrom
nekevss:impl-iterator-includes
Open

Implement Iterator.prototype.includes proposal#5227
nekevss wants to merge 7 commits intoboa-dev:mainfrom
nekevss:impl-iterator-includes

Conversation

@nekevss
Copy link
Member

@nekevss nekevss commented Mar 22, 2026

This PR implements the new Stage 2.7 Iterator includes proposal and adds some tests for it as well.

It's worth noting that the current tests don't take advantage of generator functions because our iterator helpers don't appear to work correctly with them, which we should probably look into. In the meantime, an arrow function returning an iterator was used.

I left the clamping of the skippedElements value to the range of i64, which I believe should be sufficient since it is beyond the MAX_SAFE_INTEGER.

Also worth noting, there's not test262 tests yet AFAIK, so no unflagging is needed currently.

CC: @michaelficarra for the visibility since we were talking about this just the other day

@nekevss nekevss requested a review from a team as a code owner March 22, 2026 17:02
@github-actions github-actions bot added the Waiting On Review Waiting on reviews from the maintainers label 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 C-Tests Issues and PRs related to the tests. C-Builtins PRs and Issues related to builtins/intrinsics and removed Waiting On Review Waiting on reviews from the maintainers labels Mar 22, 2026
@github-actions
Copy link

github-actions bot commented Mar 22, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 50,732 50,732 0
Ignored 1,426 1,426 0
Failed 805 805 0
Panics 0 0 0
Conformance 95.79% 95.79% 0.00%

Tested main commit: 8fcbfcbb8b9e70fe878d28376a6496eaa57a70d7
Tested PR commit: 7bf4089cf1a071ebe686d46a9bf625040c239aa6
Compare commits: 8fcbfcb...7bf4089

@codecov
Copy link

codecov bot commented Mar 22, 2026

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 59.73%. Comparing base (6ddc2b4) to head (7bf4089).
⚠️ Report is 918 commits behind head on main.

Files with missing lines Patch % Lines
...engine/src/builtins/iterable/iterator_prototype.rs 96.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5227       +/-   ##
===========================================
+ Coverage   47.24%   59.73%   +12.48%     
===========================================
  Files         476      589      +113     
  Lines       46892    63431    +16539     
===========================================
+ Hits        22154    37889    +15735     
- Misses      24738    25542      +804     

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

@github-actions github-actions bot added the Waiting On Review Waiting on reviews from the maintainers label Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Builtins PRs and Issues related to builtins/intrinsics C-Tests Issues and PRs related to the tests. Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant