16 Commits

Author SHA1 Message Date
Frank Yung-Fong Tang
4569e73420
Fix DurationFormat default tests (#3640)
1. add the test for "seconds"
2. since the default value for "style" is "long", baseStyle for GetDurationUnitOptions is "long" and therefore the 
last argument in testOption should be "long"
3. the valid values for "days" does not contains  "numeric", and "2-digit". remove them. 
4. the valid values for "milliseconds", "microseconds" and "nanoseconds" does not contains "2-digit". remove it.

See https://tc39.es/proposal-intl-duration-format/#table-duration-components about the valid value
notice the last colum is for "Digital Default" while the baseStyle is "digital" but the set up does not set it that way, the default value for "style" is "long" as in
```
13. Let style be ? GetOption(options, "style", "string", « "long", "short", "narrow", "digital" », "long").
```
of https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat

* Sync to PR 121

Change default from "long" to "short"
2022-09-14 12:51:40 -07:00
Frank Yung-Fong Tang
03cff7fcba Remove undefined to sync to PR 113
undefined is no longer value output for resolvedOptions().fractionalDigits
2022-09-14 12:42:53 -07:00
Romulo Cintra
7b2a9bb441
DurationFormat basic format tests (#3604) 2022-07-21 11:07:40 -07:00
Romulo Cintra
91a61b29ac meta: add missing feature flag 2022-07-13 09:16:05 -07:00
Romulo Cintra
6432c9df20
Increase the Intl.DurationFormat Coverage (#3592)
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
2022-07-13 12:23:57 +02:00
Romulo Cintra
392f0049d7 test invalid negative durations objects 2022-07-01 09:26:43 +02:00
Romulo Cintra
28455b13f5
Intl.DurationFormat update coverage (#3501)
* constructor tests coverage
* add localeMatcher tests
* add styles and numbering system tests
* re-organize folder and files structure
2022-05-03 08:19:32 -07:00
Romulo Cintra
ffae81a3f6 update assert name and length check 2022-01-26 16:32:15 -05:00
Romulo Cintra
034e5dd201 Update test/intl402/DurationFormat/instance/length.js
Thanks

Co-authored-by: Ms2ger <Ms2ger@gmail.com>
2022-01-26 16:32:15 -05:00
Romulo Cintra
95613d4ec8 update DurationFormat tests 2022-01-26 16:32:15 -05:00
Romulo Cintra
66f4071495 update test 2022-01-24 13:28:44 -05:00
Romulo Cintra
e687842030 update tests 2022-01-24 13:28:44 -05:00
Romulo Cintra
9f8ac1aace add instance checks 2022-01-24 13:28:44 -05:00
Frank Yung-Fong Tang
29a0a1e253 Simplify the testing
The last five lines below are simply WRONG and not according to the spec. 

```
const durationFormat = new Intl.DurationFormat();

verifyNotEnumerable(durationFormat, Symbol.toStringTag);
verifyNotWritable(durationFormat, Symbol.toStringTag);
verifyConfigurable(durationFormat, Symbol.toStringTag);
```
2021-12-14 13:37:35 -05:00
Nikhil Singhal
1f16a6ad0e docs: update features 2021-12-03 19:53:31 -05:00
Nikhil Singhal
f00ea58ae9 test(Intl.DurationFormat.prototype): check prototype attributes 2021-12-03 19:53:31 -05:00