tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

dft-currency-mnfd-range-check-mxfd.js (745B)


      1 // Copyright 2017 the V8 project authors. All rights reserved.
      2 // Copyright 2020 Apple Inc. All rights reserved.
      3 // This code is governed by the license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-setnfdigitoptions
      7 description: >
      8    When a currency is used in Intl.NumberFormat and minimumFractionDigits is
      9    not provided, maximumFractionDigits should be set as provided.
     10 ---*/
     11 
     12 assert.sameValue((new Intl.NumberFormat('en', {
     13    style: 'currency',
     14    currency: 'USD',
     15    maximumFractionDigits: 1
     16 })).resolvedOptions().maximumFractionDigits, 1);
     17 
     18 assert.sameValue((new Intl.NumberFormat('en', {
     19    style: 'currency',
     20    currency: 'CLF',
     21    maximumFractionDigits: 3
     22 })).resolvedOptions().maximumFractionDigits, 3);
     23 
     24 reportCompare(0, 0);