You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
user-event (across any Testing Library framework that can use it)
What category of rule is this?
Warns about a potential error
Optional: other category of rule
No response
Code examples
Using fake timers within a test directly:
jest.useFakeTimers();constuser=userEvent.setup();// Warn - advanceTimers not set
beforeEach(()=>{jest.useFakeTimers()});test('some behavior with user action',async()=>{constuser=userEvent.setup();// Warn - advanceTimers not set// Test behavior})
Anything else?
No response
Do you want to submit a pull request to make the new rule?
No
The text was updated successfully, but these errors were encountered:
Name for new rule
advance-timers-with-fake-timers
Description of the new rule
Enforce using the
advanceTimers
option foruser-event
when using jest'suseFakeTimers
in order to prevent testing timeoutsTesting Library feature
user-event's advanceTimers option when using fake timers
Testing Library framework(s)
user-event (across any Testing Library framework that can use it)
What category of rule is this?
Warns about a potential error
Optional: other category of rule
No response
Code examples
Using fake timers within a test directly:
Anything else?
No response
Do you want to submit a pull request to make the new rule?
No
The text was updated successfully, but these errors were encountered: