Skip to content

Commit

Permalink
docs: fix setTimeout example
Browse files Browse the repository at this point in the history
  • Loading branch information
posva authored Oct 18, 2021
1 parent e7edb75 commit 503abd7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions website/versioned_docs/version-27.2/TimerMocks.md
Original file line number Diff line number Diff line change
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 503abd7

Please sign in to comment.