diff --git a/client/karma.js b/client/karma.js index 30070151c..31c23b558 100644 --- a/client/karma.js +++ b/client/karma.js @@ -20,6 +20,10 @@ var Karma = function(socket, iframe, opener, navigator, location) { this.VERSION = constant.VERSION; this.config = {}; + // Expose for testing purposes as there is no global socket.io + // registry anymore. + this.socket = socket; + var childWindow = null; var navigateContextTo = function(url) { if (self.config.useIframe === false) { diff --git a/test/e2e/support/reconnecting/test.js b/test/e2e/support/reconnecting/test.js index c5976c81d..03af1cafe 100644 --- a/test/e2e/support/reconnecting/test.js +++ b/test/e2e/support/reconnecting/test.js @@ -3,7 +3,7 @@ describe('plus', function() { // super hacky way to get the actual socket to manipulate it... var socket = function() { var location = window.parent.location; - return window.parent.io.sockets[location.protocol + '//' + location.host]; + return window.parent.karma.socket; }; it('should pass', function() {