Closed
Description
react-testing-library
version: 7.0.1react
version: 16.8.6
Relevant code or config:
fireEvent.keyPress(button, { key: 'Enter', code: 13, charCode: 13 })
What you did:
Used info from #269 how to trigger keyPress in test.
What happened:
Did not trigger keyPress in test.
Reproduction:
https://codesandbox.io/s/reacttestinglibrary-testing-button-8bfqb
Problem description:
Button works as expected when you manually press the enter key on it.
Test does not simulate button press when fireEvent.keyPress triggers.
Metadata
Metadata
Assignees
Labels
No labels