diff --git a/README.md b/README.md index c951f48b..73062c11 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ change the state of the checkbox. - - [Installation](#installation) - [API](#api) - [`click(element)`](#clickelement) @@ -61,6 +60,7 @@ change the state of the checkbox. - [`selectOptions(element, values)`](#selectoptionselement-values) - [`toggleSelectOptions(element, values)`](#toggleselectoptionselement-values) - [`tab({shift, focusTrap})`](#tabshift-focustrap) + - [`hover(element)`](#hoverelement) - [Issues](#issues) - [🐛 Bugs](#-bugs) - [💡 Feature Requests](#-feature-requests) @@ -398,6 +398,33 @@ it('should cycle elements in document tab order', () => { }) ``` +### `hover(element)` + +Hovers over `element`. + +```jsx +import React from 'react' +import {render, screen} from '@testing-library/react' +import userEvent from '@testing-library/user-event' + +test('hover', () => { + const handler = jest.fn() + render( +