Testing · Junior · Question 50 of 78
What is better for simulating user actions: fireEvent or user-event?
- ✓Correct answer:
user-event: it reproduces the whole chain of events a real user triggers (focus, keydown, input, click…) - 2
fireEvent: it's closer to real behaviour - 3They are identical
Explanation
fireEvent.click dispatches one event. userEvent.click also moves the pointer, focuses and respects disabled and pointer-events.