Skip to content

Conversation

@bawjensen
Copy link
Contributor

What:

Adding support for brackets to address #1225

Why:

To allow easier testing of functionality that relies on both key and code being valid for keyboard events involving left/right brackets

How:

Updated keyMap.ts, ran the test suite.

Checklist:

  • [N/A] Documentation
  • Tests
  • Ready to be merged

I'm unclear whether any documentation needs updating, since I imagine this just falls under the heading of the TODO at the bottom of keyMap.ts, i.e. this is simply filling out the mappings.

Also I considered the updates to the existing tests enough, but it's possibly I ought to add more test cases (namely for the right bracket cases).

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 18, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@ph-fritsche ph-fritsche merged commit 543ecb0 into testing-library:main Jan 21, 2025
3 checks passed
@github-actions
Copy link

🎉 This PR is included in version 14.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

userEvent.keyboard(']') results in {key: ']', code: 'Unknown'}

3 participants