diff --git a/docs/TimerMocks.md b/docs/TimerMocks.md index d23dbe20a22e..7a8b78714250 100644 --- a/docs/TimerMocks.md +++ b/docs/TimerMocks.md @@ -3,7 +3,7 @@ id: timer-mocks title: Timer Mocks --- -The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=5gVv10J4nio) +The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=QZoJ2Pt27BY) ```javascript // timerGame.js diff --git a/website/versioned_docs/version-22.0/TimerMocks.md b/website/versioned_docs/version-22.0/TimerMocks.md index fd28c381d42e..1a3683ae56d2 100644 --- a/website/versioned_docs/version-22.0/TimerMocks.md +++ b/website/versioned_docs/version-22.0/TimerMocks.md @@ -4,7 +4,7 @@ title: Timer Mocks original_id: timer-mocks --- -The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=5gVv10J4nio) +The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=QZoJ2Pt27BY) ```javascript // timerGame.js diff --git a/website/versioned_docs/version-22.2/TimerMocks.md b/website/versioned_docs/version-22.2/TimerMocks.md index 3320e20d3889..1b85ade42cdf 100644 --- a/website/versioned_docs/version-22.2/TimerMocks.md +++ b/website/versioned_docs/version-22.2/TimerMocks.md @@ -4,7 +4,7 @@ title: Timer Mocks original_id: timer-mocks --- -The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=5gVv10J4nio) +The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=QZoJ2Pt27BY) ```javascript // timerGame.js diff --git a/website/versioned_docs/version-22.3/TimerMocks.md b/website/versioned_docs/version-22.3/TimerMocks.md index 9d9c38b29ccf..fe4ea0e9f5fe 100644 --- a/website/versioned_docs/version-22.3/TimerMocks.md +++ b/website/versioned_docs/version-22.3/TimerMocks.md @@ -4,7 +4,7 @@ title: Timer Mocks original_id: timer-mocks --- -The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=5gVv10J4nio) +The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=QZoJ2Pt27BY) ```javascript // timerGame.js diff --git a/website/versioned_docs/version-23.0/TimerMocks.md b/website/versioned_docs/version-23.0/TimerMocks.md index 052eb097b2fd..664fa705ca00 100644 --- a/website/versioned_docs/version-23.0/TimerMocks.md +++ b/website/versioned_docs/version-23.0/TimerMocks.md @@ -4,7 +4,7 @@ title: Timer Mocks original_id: timer-mocks --- -The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=5gVv10J4nio) +The native timer functions (i.e., `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`) are less than ideal for a testing environment since they depend on real time to elapse. Jest can swap out timers with functions that allow you to control the passage of time. [Great Scott!](https://www.youtube.com/watch?v=QZoJ2Pt27BY) ```javascript // timerGame.js