Skip to content

Sync test to https://github.com/tc39/proposal-intl-locale-info/pull/99 #4417

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions test/intl402/Locale/prototype/getWeekInfo/output-object-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ info: |
...
6. Perform ! CreateDataPropertyOrThrow(info, "firstDay", wi.[[FirstDay]]).
7. Perform ! CreateDataPropertyOrThrow(info, "weekend", we).
8. Perform ! CreateDataPropertyOrThrow(info, "minimalDays", wi.[[MinimalDays]]).
...
CreateDataProperty ( O, P, V )
...
Expand All @@ -27,7 +26,7 @@ function isIntegerBetweenOneAndSeven(value) {
return value === 1 || value === 2 || value === 3 || value === 4 || value === 5 || value === 6 || value === 7;
}

assert.compareArray(Reflect.ownKeys(result), ['firstDay', 'weekend', 'minimalDays']);
assert.compareArray(Reflect.ownKeys(result), ['firstDay', 'weekend']);

verifyProperty(result, 'firstDay', {
writable: true,
Expand All @@ -53,12 +52,8 @@ let original = new Intl.Locale('en').getWeekInfo().weekend;
let sorted = original.slice().sort();
assert.compareArray(original, sorted);

verifyProperty(result, 'minimalDays', {
writable: true,
enumerable: true,
configurable: true
});
assert(
isIntegerBetweenOneAndSeven(new Intl.Locale('en').getWeekInfo().minimalDays),
'`minimalDays` must be an integer between one and seven (inclusive)'
assert.sameValue(
new Intl.Locale('en').getWeekInfo().minimalDays,
undefined,
'`minimalDays` is not defined.'
Comment on lines +55 to +58
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably just be deleted, as the ownKeys test above already ensures there isn't a minimalDays own property. (An implementation would still be technically, but uselessly, conformant if it added a Object.prototype.minimalDays property.)

);