Skip to content
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

Merged
merged 2 commits into from
Sep 2, 2021
Merged

Validate input to Calendar.prototype.fields #1750

merged 2 commits into from
Sep 2, 2021

Conversation

cjtenny
Copy link
Collaborator

@cjtenny cjtenny commented Aug 20, 2021

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.

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.
@cjtenny cjtenny requested a review from ptomato August 20, 2021 01:09
@codecov
Copy link

codecov bot commented Aug 20, 2021

Codecov Report

Merging #1750 (0c3fefc) into main (902c429) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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              
Flag Coverage Δ
test262 78.26% <100.00%> (+4.85%) ⬆️
tests 90.08% <92.85%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
polyfill/lib/calendar.mjs 94.34% <100.00%> (+0.49%) ⬆️
polyfill/lib/plaintime.mjs 88.82% <0.00%> (-1.93%) ⬇️
polyfill/lib/duration.mjs 98.08% <0.00%> (+<0.01%) ⬆️
polyfill/lib/plainyearmonth.mjs 96.42% <0.00%> (+<0.01%) ⬆️
polyfill/lib/zoneddatetime.mjs 98.46% <0.00%> (+0.07%) ⬆️
polyfill/lib/ecmascript.mjs 94.86% <0.00%> (+0.07%) ⬆️
polyfill/lib/instant.mjs 94.44% <0.00%> (+0.34%) ⬆️
polyfill/lib/plainmonthday.mjs 93.91% <0.00%> (+0.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 902c429...0c3fefc. Read the comment docs.

Copy link
Collaborator

@ptomato ptomato left a 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.

spec/calendar.html Show resolved Hide resolved
spec/calendar.html Outdated Show resolved Hide resolved
@ptomato
Copy link
Collaborator

ptomato commented Aug 31, 2021

This change achieved consensus in TC39. Can be merged when the wording feedback is addressed and the tests are added.

@ptomato ptomato marked this pull request as ready for review August 31, 2021 18:09
@cjtenny cjtenny requested a review from ptomato September 1, 2021 08:03
Copy link
Collaborator

@ptomato ptomato left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants