Skip to content

Commit

Permalink
docs: fix setTimeout example (#11974)
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Oct 18, 2021
1 parent e7edb75 commit a1829e9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/TimerMocks.md
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions website/versioned_docs/version-27.0/TimerMocks.md
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions website/versioned_docs/version-27.1/TimerMocks.md
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions website/versioned_docs/version-27.2/TimerMocks.md
Expand Up @@ -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');
Expand Down

0 comments on commit a1829e9

Please sign in to comment.