diff --git a/Libraries/Interaction/__tests__/InteractionManager-test.js b/Libraries/Interaction/__tests__/InteractionManager-test.js index 3b551e84b3f..00428e8eabe 100644 --- a/Libraries/Interaction/__tests__/InteractionManager-test.js +++ b/Libraries/Interaction/__tests__/InteractionManager-test.js @@ -168,7 +168,7 @@ describe('promise tasks', () => { } beforeEach(() => { jest.resetModules(); - jest.useFakeTimers(); + jest.useFakeTimers('legacy'); InteractionManager = require('../InteractionManager'); BatchedBridge = require('../../BatchedBridge/BatchedBridge'); sequenceId = 0; diff --git a/flow/jest.js b/flow/jest.js index 8f562116961..c64fc43c224 100644 --- a/flow/jest.js +++ b/flow/jest.js @@ -900,7 +900,7 @@ type JestObjectType = { * (setTimeout, setInterval, clearTimeout, clearInterval, nextTick, * setImmediate and clearImmediate). */ - useFakeTimers(): JestObjectType, + useFakeTimers(type?: 'legacy' | 'modern'): JestObjectType, /** * Instructs Jest to use the real versions of the standard timer functions. */ diff --git a/jest.config.js b/jest.config.js index 512bd1b538e..4c5aee76f41 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,7 +16,7 @@ module.exports = { '.*': './jest/private/preprocessor.js', }, setupFiles: ['./jest/setup.js'], - timers: 'fake', + timers: 'legacy', testRegex: '/__tests__/.*-test\\.js$', testPathIgnorePatterns: [ '/node_modules/',