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 proposal-duplicate-named-capturing-groups #3625

Merged
merged 4 commits into from
Aug 9, 2022

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Aug 1, 2022

This adds simple tests for https://github.com/tc39/proposal-duplicate-named-capturing-groups, which achieved stage 3 at the July 2022 meeting. No existing tests were invalidated, but some needed their descriptions updated.

@bakkot bakkot requested a review from a team as a code owner August 4, 2022 23:29
gibson042
gibson042 previously approved these changes Aug 8, 2022
Comment on lines +14 to +24
assert.compareArray(
Object.keys(regexp.exec("aa").groups),
["y", "x"],
"property enumeration order of the groups object is based on source order, not match order"
);

assert.compareArray(
Object.keys(regexp.exec("bb").groups),
["y", "x"],
"property enumeration order of the groups object is based on source order, not match order"
);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like for these messages to be distinct, but I can't come up with clear replacements that are.

@ptomato ptomato force-pushed the duplicate-named-capture-groups branch from c290a35 to 5d3bd3c Compare August 9, 2022 19:10
@ptomato
Copy link
Contributor

ptomato commented Aug 9, 2022

Making a sweep of approved but unmerged PRs; feel free to follow up with an improvement to the assertion message if one occurs to you.

@ptomato ptomato merged commit adba7df into tc39:main Aug 9, 2022
@bakkot bakkot deleted the duplicate-named-capture-groups branch August 9, 2022 19:19
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