From e21c9ca12723c9a332bf34637e1c00769898c4fd Mon Sep 17 00:00:00 2001 From: Alex Reardon Date: Wed, 4 Oct 2023 10:32:01 +1100 Subject: [PATCH] tweaking docs --- docs/TimerMocks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/TimerMocks.md b/docs/TimerMocks.md index c8663a87cac3..7c3f26834fc3 100644 --- a/docs/TimerMocks.md +++ b/docs/TimerMocks.md @@ -167,9 +167,9 @@ it('calls the callback after 1 second via advanceTimersByTime', () => { Lastly, it may occasionally be useful in some tests to be able to clear all of the pending timers. For this, we have `jest.clearAllTimers()`. -## Advance Timers by frame +## Advance Timers by Frame -In applications, often you want to schedule work inside of an animation frame (via `requestAnimationFrame`). We expose a convenance method `jest.runToFrame()` to advance all timers enough to execute all actively scheduled animation frames. +In applications, often you want to schedule work inside of an animation frame (via `requestAnimationFrame`). We expose a convenance method `jest.runToFrame()` to advance all timers enough milliseconds to execute all actively scheduled animation frames. ```javascript jest.useFakeTimers();