Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intl.NumberFormat v3: Improve coverage of SetNumberFormatDigitOptions #3508

Open
sffc opened this issue Apr 30, 2022 · 1 comment
Open

Intl.NumberFormat v3: Improve coverage of SetNumberFormatDigitOptions #3508

sffc opened this issue Apr 30, 2022 · 1 comment

Comments

@sffc
Copy link
Contributor

sffc commented Apr 30, 2022

SetNumberFormatDigitOptions is a complicated part of the spec that we should ensure that implementations get right.

In particular:

  1. Ensure that all combinations of the presence of maximumFractionDigits, maximumSignificantDigits, roundingPriority: "morePrecision", roundingPriority: "lessPrecision", and notation: "compact" are tested and that they produce the expected resolvedOptions.
  2. Migrate as much of @gibson042's excellent test suite as possible; see Editorial: Refactor SetNumberFormatDigitOptions ecma402#575 (review) -- note that this is based on NFv2 (current spec), not NFv3, so it may need to be updated. Alternatively, it may be useful to have the NFv2 and NFv3 tests exist in tandem.

CC @romulocintra @FrankYFTang

@romulocintra
Copy link
Member

romulocintra commented May 2, 2022

  1. Ensure that all combinations of the presence of maximumFractionDigits, maximumSignificantDigits, roundingPriority: "morePrecision", roundingPriority: "lessPrecision", and notation: "compact" are tested and that they produce the expected resolvedOptions.

Started a Draft here combining some of the values :
Todo :

  • Test notation
  • Add correct results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants