diff --git a/lib/server.js b/lib/server.js index 789a57fc7..b558b5227 100644 --- a/lib/server.js +++ b/lib/server.js @@ -105,15 +105,15 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file }]).instantiate(browser.Browser); newBrowser.init(); + + // execute in this browser immediately + if (config.singleRun) { + newBrowser.execute(config.client); + singleRunBrowsers.add(newBrowser); + } } replySocketEvents(); - - // execute in this browser immediately - if (config.singleRun) { - newBrowser.execute(config.client); - singleRunBrowsers.add(newBrowser); - } }); });