Fix the 2 promise tests skipped on JavaScriptCore and Hermes in Runtime_tests.cpp

Open
#228 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp, javascript
Domain
mobile, testing

Research direction

Start with the skip conditions and the two named tests in valdi/test/integration/Runtime_tests.cpp, then run the provided Bazel command repeatedly on macOS JavaScriptCore and the affected engines. Trace the promise polyfill behavior for the race and unhandled rejection cases. Done when neither test is skipped on an engine where it can pass and both pass repeatedly.

Written by the indexing model from the issue text.

Description

Two tests in valdi/test/integration/Runtime_tests.cpp are skipped on some engines because of the promise polyfill:

Test Skipped on Reason in the code
supportsPromiseCallWithPromiseParametersStepByStep JavaScriptCore Racy with the promise polyfill used on Linux JavaScriptCore
supportsUnhandledRejectionHandler JavaScriptCore, Hermes Doesn't work with the promise polyfill on Linux JavaScriptCore and on Hermes

The skips check only the engine, so they also apply to JavaScriptCore on macOS, where the Linux polyfill isn't used.

What to do, for each test:

  • Check whether it passes on macOS JavaScriptCore. If it does, narrow the skip to the polyfill case.
  • Fix the race or the missing unhandled-rejection support in the polyfill, then remove the skip.

How to run

bazel test //valdi:test_integration --test_filter='*supportsPromiseCallWithPromiseParametersStepByStep*:*supportsUnhandledRejectionHandler*' --runs_per_test=20

Done when: neither test is skipped on an engine where it can pass, and both pass repeatedly.

See CONTRIBUTING.md before opening a pull request.

Dominant language
C++
Stars
16.4k
Forks
539
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Snapchat/Valdi

All issues in Snapchat/Valdi

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.