diff --git a/docs/ecosystem-user-event.mdx b/docs/ecosystem-user-event.mdx index 724dc97ad..9972c7f55 100644 --- a/docs/ecosystem-user-event.mdx +++ b/docs/ecosystem-user-event.mdx @@ -3,28 +3,40 @@ id: ecosystem-user-event title: user-event --- +import Tabs from '@theme/Tabs' +import TabItem from '@theme/TabItem' + [`user-event`][gh] is a companion library for Testing Library that provides more advanced simulation of browser interactions than the built-in [`fireEvent`](dom-testing-library/api-events.mdx#fireevent) method. -[`user-event` on GitHub][gh] +## Installation -## Install + + -``` +```sh npm install --save-dev @testing-library/user-event @testing-library/dom ``` -```jsx -import { screen } from '@testing-library/dom' + + + +```sh +yarn add --dev @testing-library/user-event @testing-library/dom +``` + + + + +Now simply import it in your tests: + +```js import userEvent from '@testing-library/user-event' -test('types inside textarea', () => { - document.body.innerHTML = `