Skip to content

fix: support usage of . in keyboard user-events #40

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

malouro
Copy link

@malouro malouro commented May 30, 2025

What:

Adds a period (".") into the current user-event keyboard map.

Why:

Currently, the following code produces unexpected results:

userEvent.keyboard('[email protected]');

outputs the following into the console:

user@emailUnknowncom

How:

Updated the defaultKeyMap to contain a value for . (\x2e hex code)

Checklist:

  • Tests (N\A)
  • TypeScript definitions updated (N\A)
  • Ready to be merged

(I believe it's unnecessary to update tests for this as I didn't see existing specs that covered this keyMap, but correct me if I'm wrong)

Copy link

pkg-pr-new bot commented May 31, 2025

Open in StackBlitz

npm i https://pkg.pr.new/cli-testing-library@40

commit: 8933689

@malouro
Copy link
Author

malouro commented Jun 11, 2025

Hey @crutchcorn, can this be merged or did you need something more before merging?

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.

2 participants