Skip to content

Add Rust-level tests for Promise.all and Promise.any#4882

Merged
jedel1043 merged 1 commit intoboa-dev:mainfrom
mrhapile:promise-combinator-tests
Mar 6, 2026
Merged

Add Rust-level tests for Promise.all and Promise.any#4882
jedel1043 merged 1 commit intoboa-dev:mainfrom
mrhapile:promise-combinator-tests

Conversation

@mrhapile
Copy link
Copy Markdown
Contributor

@mrhapile mrhapile commented Mar 5, 2026

This PR adds Rust-level unit tests for Promise combinators.

Currently core/engine/src/builtins/promise/tests.rs only contains a
basic Promise test and does not cover combinators such as Promise.all
or Promise.any.

While these behaviors are validated through test262, localized Rust
tests improve debugging, provide faster CI feedback, and help prevent
regressions when modifying the Promise implementation.

This PR introduces tests for:

  • Promise.all resolution behavior
  • Promise.all rejection propagation
  • Promise.any first-success resolution

No runtime behavior is modified. This change only adds tests.

Signed-off-by: mrhapile <allinonegaming3456@gmail.com>
Copilot AI review requested due to automatic review settings March 5, 2026 19:31
@mrhapile mrhapile requested a review from a team as a code owner March 5, 2026 19:31
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 5, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,666 49,666 0
Ignored 2,284 2,284 0
Failed 1,013 1,013 0
Panics 0 0 0
Conformance 93.77% 93.77% 0.00%

Tested main commit: 5cbf23323e1be945022cd1e6332cbacc22e9a2c8
Tested PR commit: c0624ca2ea636db4ceb5e162cba56d3866c70895
Compare commits: 5cbf233...c0624ca

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 5, 2026

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4882       +/-   ##
===========================================
+ Coverage   47.24%   57.39%   +10.14%     
===========================================
  Files         476      555       +79     
  Lines       46892    60599    +13707     
===========================================
+ Hits        22154    34778    +12624     
- Misses      24738    25821     +1083     

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

Copy link
Copy Markdown
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.

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

Copy link
Copy Markdown
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Thanks!

@jedel1043 jedel1043 added C-Tests Issues and PRs related to the tests. C-Builtins PRs and Issues related to builtins/intrinsics labels Mar 6, 2026
@jedel1043 jedel1043 added this pull request to the merge queue Mar 6, 2026
Merged via the queue into boa-dev:main with commit a83e49f Mar 6, 2026
19 checks passed
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants