-
Notifications
You must be signed in to change notification settings - Fork 158
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
Validate input to Calendar.prototype.fields #1750
Conversation
As discussed in #1610, we restrict values returned by the iterator to be no more than the ten known values, prohibiting duplicates. The check for String values has been removed as all of those values are Strings, so the value restriction is plenty. This does not address the question of return value validation.
Codecov Report
@@ Coverage Diff @@
## main #1750 +/- ##
==========================================
+ Coverage 94.81% 94.87% +0.05%
==========================================
Files 19 19
Lines 10764 10927 +163
Branches 1725 1740 +15
==========================================
+ Hits 10206 10367 +161
- Misses 545 547 +2
Partials 13 13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me; tests to follow.
This change achieved consensus in TC39. Can be merged when the wording feedback is addressed and the tests are added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Some minor comments on the tests.
polyfill/test/Calendar/prototype/fields/argument-throws-duplicate-keys.js
Show resolved
Hide resolved
polyfill/test/Calendar/prototype/fields/argument-throws-duplicate-keys.js
Outdated
Show resolved
Hide resolved
polyfill/test/Calendar/prototype/fields/argument-throws-duplicate-keys.js
Outdated
Show resolved
Hide resolved
b5b8946
to
0c3fefc
Compare
As discussed in #1610, we restrict values returned by the iterator to be no more than the ten known values, prohibiting duplicates. The check for String values has been removed as all of those values are Strings, so the value restriction is plenty.
This does not address the question of return value validation.