Tests for Promise.withResolvers
Open
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.prototypeprototype - produces an object with the keys
resolve,reject, andpromise - the value of the
promiseproperty on the produced object is an instance of the receiver - the values of the
resolveandrejectproperties 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
promiseproperty if it returns a value that isn't an instance of itself
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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