cli-testing-library icon indicating copy to clipboard operation
cli-testing-library copied to clipboard

Add support for back and forward slash keys via `userEvent.keyboard`

Open nicklemmon opened this issue 9 months ago • 1 comments

Describe the feature you'd like:

userEvent.keyboard('/test-dir/')

Should result in "/test-dir/" being entered in to the console. Instead the following is logged:

"Unknowntest-dirUnknown"

Suggested implementation:

Add back and forward slashes to keyMap.ts

Describe alternatives you've considered:

Using fireEvent(instance, { value: "/test-dir/" }) is a good workaround

Teachability, Documentation, Adoption, Migration Strategy:

Documentation would need to be aded to: https://cli-testing.com/guides/user-event/#keyboardinstance-text-options

nicklemmon avatar Apr 07 '25 15:04 nicklemmon