diff --git a/flow-typed/npm/lolex_v2.x.x.js b/flow-typed/npm/lolex_v2.x.x.js index 67e3fc907049..f0662541324a 100644 --- a/flow-typed/npm/lolex_v2.x.x.js +++ b/flow-typed/npm/lolex_v2.x.x.js @@ -5,6 +5,7 @@ declare module 'lolex' { declare module.exports: {| createClock(now?: number, loopLimit?: number): LolexClock; install(config?: LolexConfig): LolexClock; + setTimersReturnsObjects(value: boolean): boolean; |}; } diff --git a/node_modules/lolex/src/lolex-src.js b/node_modules/lolex/src/lolex-src.js index c5ccf91a1bfd..d76dc6c3255f 100644 --- a/node_modules/lolex/src/lolex-src.js +++ b/node_modules/lolex/src/lolex-src.js @@ -742,6 +742,12 @@ function createClock(start, loopLimit) { } exports.createClock = createClock; +exports.setTimersReturnsObjects = function(value) { + var oldValue = addTimerReturnsObject; + addTimerReturnsObject = value; + return oldValue; +}; + /** * @param config {Object} optional config * @param config.target {Object} the target to install timers in (default `window`)