Repository navigation
Test date defaults - #5155
Test date defaults#5155jugglinmike wants to merge 2 commits into
Conversation
Resolves tc39/ecma402#816
|
5 new or modified tests were run on 7 engines.
|
| for (const calendar of allCalendars()) { | ||
| const options = new Intl.DateTimeFormat('en', { | ||
| calendar, day: 'numeric', month: 'numeric', year: 'numeric' | ||
| }).resolvedOptions(); |
There was a problem hiding this comment.
Suggestion: the main thing you're testing here (and elsewhere in this PR) is resolvedOptions behavior. The name of the PR and the test should indicate this.
There was a problem hiding this comment.
Got it. (I thought the bug was in CreateDateTimeFormat, and that we were only using resolvedOptions to observe it. If that were the case, though, then I think we'd be able to observe it through Date.prototype.toLocaleString and DateTimeFormat.prototype.formatToParts... Except we can't.)
| /*--- | ||
| esid: sec-intl.datetimeformat | ||
| description: Day, month, and year are honored when all three are specified | ||
| info: | |
There was a problem hiding this comment.
It's fine to keep including the spec text blocks if you'd like, but for your reference we no longer encourage their use in new tests so you are also welcome to leave them out.
There was a problem hiding this comment.
Noted! In this case, I ended up adding more context because it clarifies a misunderstanding that I had in the first draft of these tests.
Resolves tc39/ecma402#816