diff --git a/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js b/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js index 09ec56663..da86fc07f 100644 --- a/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +++ b/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js @@ -12,6 +12,7 @@ var remoteModulesConfig = [ ['RemoteModule1',null,['remoteMethod','promiseMethod'],[]], ['RemoteModule2',null,['remoteMethod','promiseMethod'],[]], + ['Timing',null,['callImmediates']], ]; var MessageQueueTestConfig = { diff --git a/Libraries/Core/Timers/JSTimers.js b/Libraries/Core/Timers/JSTimers.js index f834669f3..67f71c231 100644 --- a/Libraries/Core/Timers/JSTimers.js +++ b/Libraries/Core/Timers/JSTimers.js @@ -478,4 +478,10 @@ const JSTimers = { }, }; -module.exports = JSTimers; +if (!Timing) { + console.warn("Timing native module is not available, can't set timers."); + // $FlowFixMe: we can assume timers are generally available + module.exports = ({}: typeof JSTimers); +} else { + module.exports = JSTimers; +}