tc39 / tc39/test262

Tests for Promise.withResolvers

Open
#3,910 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.8k
Forks
564
Avg merge
3d 7h
Merged PRs (30d)
10

Description

I was asked to open this issue to track test completeness for the Stage 3 Promise.withResolvers method. I'm pretty new to this so any suggestions for things that should go in this tracker would be very appreciated.

  • boilerplate tests (e.g., length.js, name.js, prop-desc.js, not-a-constructor.js, builtin.js)
  • throws a type error if receiver is not a constructor
  • produces an object with the Object.prototype prototype
  • produces an object with the keys resolve, reject, and promise
  • the value of the promise property on the produced object is an instance of the receiver
  • the values of the resolve and reject properties are both 1-place functions
  • Receiver constructor does not have to extend built-in Promise
  • Function body of the receiver constructor
    • throws
    • TypeError if it passes only zero or one parameter to the executor (because we can't get a resolve or reject)
    • nothing happens if it passes more than 2 parameters to the executor
    • TypeError if it passes a non-callable resolve to the executor
    • TypeError if it passes a non-callable reject to the executor
    • TypeError if it calls the executor twice
    • value of promise property if it returns a value that isn't an instance of itself

Contributor guide

Open the contributing guide

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.

Research direction

Start with the unchecked boilerplate tests: length.js, name.js, prop-desc.js, not-a-constructor.js, and builtin.js. Then work through the remaining unchecked Promise.withResolvers cases in the issue, running the relevant test262 tests as you go; done means the checklist is covered with tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.