()
| 683 | const onSubmit = jest.fn().mockImplementation(e => e.preventDefault()); |
| 684 | |
| 685 | function Test() { |
| 686 | const [selectedKey, setSelectedKey] = React.useState(null); |
| 687 | return ( |
| 688 | <Form onSubmit={onSubmit}> |
| 689 | <TestSelect |
| 690 | isRequired |
| 691 | name="select" |
| 692 | selectedKey={selectedKey} |
| 693 | onSelectionChange={setSelectedKey} |
| 694 | /> |
| 695 | <Button data-testid="submit" type="submit"> |
| 696 | Submit |
| 697 | </Button> |
| 698 | <Button data-testid="clear" onPress={() => setSelectedKey(null)}> |
| 699 | Reset |
| 700 | </Button> |
| 701 | </Form> |
| 702 | ); |
| 703 | } |
| 704 | |
| 705 | const {getByTestId} = render(<Test />); |
| 706 | const wrapper = getByTestId('select'); |
nothing calls this directly
no test coverage detected