Follow-up to Intl.DurationFormat #3912

Open
#4,168 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
testing

Research direction

Start by reading issue #3912 and the two named tests: test/intl402/DurationFormat/constructor-option-read-order.js and test/intl402/DurationFormat/prototype/resolvedOptions/return-keys-order-default.js. Run these tests before changing them, then update the coverage for property-read order and fractionalDigits construction; done means the expected orders are tested and the tests pass.

Written by the indexing model from the issue text.

Description

Address comments from #3912.

  • test/intl402/DurationFormat/constructor-option-read-order.js: localeMatcher is read before numberingSystem but isn't in resolvedOptions(). Probably better to use a Proxy that pushes all Get operations to the array, rather than just the ones in resolvedOptions().
  • test/intl402/DurationFormat/prototype/resolvedOptions/return-keys-order-default.js: fractionalSeconds is added last if not undefined. Consider testing the order again when constructing the object with e.g. new Intl.DurationFormat('en', { fractionalDigits: 0 }).

cc @FrankYFTang

Dominant language
JavaScript
Stars
2.9k
Forks
571
Avg merge
1d 22h
Merged PRs (30d)
13

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 tc39/test262

All issues in tc39/test262

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.