From be954143c3c22ec5909995b1c7c04ee475af9352 Mon Sep 17 00:00:00 2001 From: orangemug Date: Mon, 10 Sep 2018 15:09:34 +0100 Subject: [PATCH] Switch to setTimeout(fn, 0) --- test/functional/util/webdriverio-ext.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/util/webdriverio-ext.js b/test/functional/util/webdriverio-ext.js index ee35b48..67f54f5 100644 --- a/test/functional/util/webdriverio-ext.js +++ b/test/functional/util/webdriverio-ext.js @@ -46,10 +46,10 @@ try { browser.addCommand('flushReactUpdates', function() { browser.executeAsync(function(done) { // For any events to propogate - setImmediate(function() { + setTimeout(function() { // For the DOM to be updated. - setImmediate(done); - }) + setTimeout(done, 0); + }, 0) }) })