Skip to content

Commit

Permalink
test(e2e): Fix reconnection tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed May 27, 2015
1 parent 4bcc871 commit ce912bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/support/reconnecting/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ce912bf

Please sign in to comment.