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

Add tests for Object.groupBy and Map.groupBy with string items #4038

Merged
merged 5 commits into from
Apr 4, 2024

Conversation

sosukesuzuki
Copy link
Contributor

Fixes #4036

@sosukesuzuki sosukesuzuki requested a review from a team as a code owner April 1, 2024 04:27
@ljharb ljharb requested a review from a team April 1, 2024 05:24
Copy link
Contributor

@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.

Not much to add to what Jordan said.

For me this is also fine to merge as is, but as long as we're on the topic of grouping strings with weird edge cases: if you felt like doing extra work, I think it might help to have coverage for ASCII strings (to help debuggability in case an implementation gets single characters right but surrogate pairs wrong) and grapheme clusters (like 👨‍👦 being split into 👨, ZWJ, and 👦.)

Thanks for contributing!

@sosukesuzuki
Copy link
Contributor Author

@ptomato Thank you for your review. I would like this PR to be merged as is. Maybe I'll send a PR to add test cases later.

@ptomato
Copy link
Contributor

ptomato commented Apr 4, 2024

@sosukesuzuki Works for me. I'll merge this now and copy my comment into #4036 for whoever picks it up.

@ptomato ptomato merged commit b73f7d6 into tc39:main Apr 4, 2024
8 checks passed
ljharb added a commit to es-shims/Map.groupBy that referenced this pull request Apr 4, 2024
ljharb added a commit to es-shims/Object.groupBy that referenced this pull request Apr 4, 2024
@sosukesuzuki sosukesuzuki deleted the groupby-with-strings branch April 5, 2024 03:36
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.

Add test case for Object.groupBy / Map.groupBy with strings?
3 participants