@@ -43,23 +43,23 @@ change the state of the checkbox.
43
43
With NPM:
44
44
45
45
``` sh
46
- npm install user-event --dev
46
+ npm install @testing-library/ user-event --dev
47
47
```
48
48
49
49
With Yarn:
50
50
51
51
``` sh
52
- yarn add user-event --dev
52
+ yarn add @testing-library/ user-event --dev
53
53
```
54
54
55
55
Now simply import it in your tests:
56
56
57
57
``` js
58
- import userEvent from " user-event" ;
58
+ import userEvent from " @testing-library/ user-event" ;
59
59
60
60
// or
61
61
62
- var userEvent = require (" user-event" );
62
+ var userEvent = require (" @testing-library/ user-event" );
63
63
```
64
64
65
65
## API
@@ -71,8 +71,8 @@ effects.
71
71
72
72
``` jsx
73
73
import React from " react" ;
74
- import { render } from " react- testing-library" ;
75
- import userEvent from " user-event" ;
74
+ import { render } from " @ testing-library/react " ;
75
+ import userEvent from " @testing-library/ user-event" ;
76
76
77
77
const { getByText , getByTestId } = test (" click" , () => {
78
78
render (
@@ -94,8 +94,8 @@ side effects.
94
94
95
95
``` jsx
96
96
import React from " react" ;
97
- import { render } from " react- testing-library" ;
98
- import userEvent from " user-event" ;
97
+ import { render } from " @ testing-library/react " ;
98
+ import userEvent from " @testing-library/ user-event" ;
99
99
100
100
test (" double click" , () => {
101
101
const onChange = jest .fn ();
@@ -115,8 +115,8 @@ Writes `text` inside an `<input>` or a `<textarea>`.
115
115
116
116
``` jsx
117
117
import React from " react" ;
118
- import { render } from " react- testing-library" ;
119
- import userEvent from " user-event" ;
118
+ import { render } from " @ testing-library/react " ;
119
+ import userEvent from " @testing-library/ user-event" ;
120
120
121
121
const { getByText } = test (" click" , () => {
122
122
render (< textarea data- testid= " email" / > );
0 commit comments