-
Notifications
You must be signed in to change notification settings - Fork 444
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
add tests for array.prototype.groupToMap #3353
Conversation
beb02e0
to
eab650a
Compare
Wow! This is a great head start here :) Let's wait until our video call on Friday to do a review together. |
Similarly to #3354, i think this could use some tests for throwing on a non-function callback, but otherwise it matches my polyfill's tests! |
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.
Awesome, thanks - I just have two nitpicks about things that probably slipped in when copying the new stuff from the group
PR. I will fix these up and merge it right away.
66ee99d
to
7a4ec2b
Compare
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.
Re-approving
|
||
... | ||
includes: [compareArray.js] | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Symbol.iterator, arrow-function, Map] |
c. Let key be ? Call(callbackfn, thisArg, « kValue, 𝔽(k), O »). | ||
e. Perform ! AddValueToKeyedGroup(groups, key, kValue). | ||
... | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, arrow-function, Map] |
@@ -0,0 +1,24 @@ | |||
// Copyright (c) 2021 Ecma International. All rights reserved. |
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.
should all these change to 2022?
c. Let propertyKey be ? ToPropertyKey(? Call(callbackfn, thisArg, « kValue, 𝔽(k), O »)). | ||
|
||
... | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Map] |
b. Perform ! CreateDataPropertyOrThrow(map, g.[[Key]], elements). | ||
|
||
... | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Map, arrow-function] |
|
||
... | ||
includes: [compareArray.js] | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Map, arrow-function] |
|
||
... | ||
includes: [compareArray.js] | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Map, arrow-function] |
|
||
... | ||
flags: [onlyStrict] | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Map] |
|
||
... | ||
flags: [noStrict] | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Map] |
|
||
... | ||
includes: [compareArray.js] | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Map, Symbol.iterator, arrow-function] |
|
||
... | ||
includes: [compareArray.js] | ||
features: [array-grouping] |
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.
features: [array-grouping] | |
features: [array-grouping, Map, Symbol.iterator, arrow-function] |
re. exhaustive features list, shrug; the documentation in features.txt says about stage 4 features:
I don't think these are "relatively new" and it seems burdensome to contributors who just want to get their tests landed, for us to require them. Many of them can be added automatically anyway should anyone complain. |
It's totally fine to land this without them, and i can add them to #3664. However, if we want test262 to ever be usable on packages - which tend to have long lists of supported platforms - exhaustive feature lists are a critical thing to have to ensure that's achievable. |
Fair enough, I'd say we should avoid putting that burden on test contributors though 😄 Let's open an issue to review that documentation in features.txt and do something like add a pre-commit script that will automatically add as many features as possible. |
Agreed, let's land this now as it's been waiting for a long time, and update #3664 |
Filed #3664. |
Added tests for proposal Array Grouping
CC @codehag