Skip to content

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

@nicklemmon

Description

@nicklemmon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions