diff --git a/docs/TimerMocks.md b/docs/TimerMocks.md index ef2cc71fe361..e97e2af97709 100644 --- a/docs/TimerMocks.md +++ b/docs/TimerMocks.md @@ -25,6 +25,7 @@ module.exports = timerGame; 'use strict'; jest.useFakeTimers(); +jest.spyOn(global, 'setTimeout'); test('waits 1 second before ending the game', () => { const timerGame = require('../timerGame'); diff --git a/website/versioned_docs/version-27.0/TimerMocks.md b/website/versioned_docs/version-27.0/TimerMocks.md index ef2cc71fe361..e97e2af97709 100644 --- a/website/versioned_docs/version-27.0/TimerMocks.md +++ b/website/versioned_docs/version-27.0/TimerMocks.md @@ -25,6 +25,7 @@ module.exports = timerGame; 'use strict'; jest.useFakeTimers(); +jest.spyOn(global, 'setTimeout'); test('waits 1 second before ending the game', () => { const timerGame = require('../timerGame'); diff --git a/website/versioned_docs/version-27.1/TimerMocks.md b/website/versioned_docs/version-27.1/TimerMocks.md index ef2cc71fe361..e97e2af97709 100644 --- a/website/versioned_docs/version-27.1/TimerMocks.md +++ b/website/versioned_docs/version-27.1/TimerMocks.md @@ -25,6 +25,7 @@ module.exports = timerGame; 'use strict'; jest.useFakeTimers(); +jest.spyOn(global, 'setTimeout'); test('waits 1 second before ending the game', () => { const timerGame = require('../timerGame'); diff --git a/website/versioned_docs/version-27.2/TimerMocks.md b/website/versioned_docs/version-27.2/TimerMocks.md index ef2cc71fe361..e97e2af97709 100644 --- a/website/versioned_docs/version-27.2/TimerMocks.md +++ b/website/versioned_docs/version-27.2/TimerMocks.md @@ -25,6 +25,7 @@ module.exports = timerGame; 'use strict'; jest.useFakeTimers(); +jest.spyOn(global, 'setTimeout'); test('waits 1 second before ending the game', () => { const timerGame = require('../timerGame');