Bug in test/intl402/NumberFormat/currency-digits-nonstandard-notation.js

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
testing

Research direction

Open test/intl402/NumberFormat/currency-digits-nonstandard-notation.js and inspect the maximumFractionDigits assertion described in the issue. Run this Test262 test with the repository's test runner and confirm that the compact notation case expects 0 while other cases expect 3.

Written by the indexing model from the issue text.

Description

The test added by #4274 (i.e. test/intl402/NumberFormat/currency-digits-nonstandard-notation.js) contains an incorrect assertion for maximumFractionDigits. It requires them to be 3 but they should be 0 when the notation is compact, see this comment for details.

In other words, there should be something like

assert.sameValue(maximumFractionDigits, (notation === 'compact') ? 0 : 3, ...

instead of

assert.sameValue(maximumFractionDigits, 3, ...
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.