Missing tests for `next` caching in array-destructuring?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 564
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 10
Description
Statements like const [] = iterable and const [x, y] = iterable should get an iterator from iterable and cache its next method, resulting in exactly one observable read thereof. But we may be missing coverage for this, as evidenced by https://github.com/Moddable-OpenSource/moddable/issues/1223 (unless the coverage is present and I've just missed it).
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 by searching the test262 repository for existing array-destructuring and iterator tests, then review the behavior described in Moddable issue 1223 and the related ECMAScript pull request. Add coverage for empty and multi-element array destructuring, and confirm the tests observe exactly one read of the iterator's next method.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100