karma-jasmine
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -38,9 +38,17 @@ (function(window) { | ||
var getCurrentTransport = function() { | ||
// probably running in debug.html (there's no socket.io) | ||
if (!window.parent.io) { | ||
var parentWindow = window.opener || window.parent; | ||
var location = parentWindow.location; | ||
var hostname = 'http://' + location.host; | ||
if (!location.port) { | ||
hostname += ':80'; | ||
} | ||
// Probably running in debug.html (there's no socket.io), | ||
// or in debug mode with socket.io but no socket on this host. | ||
if (!parentWindow.io || !parentWindow.io.sockets[hostname]) { | ||
return null; | ||
} | ||
var location = window.parent.location; | ||
return window.parent.io.sockets[location.protocol + '//' + location.host].transport.name; | ||
return parentWindow.io.sockets[hostname].transport.name; | ||
}; | ||
@@ -88,3 +96,3 @@ | ||
// This structure can be pretty huge and it blows up socke.io connection, when polling. | ||
// This structure can be pretty huge and it blows up socket.io connection, when polling. | ||
// https://github.com/LearnBoost/socket.io-client/issues/569 | ||
@@ -91,0 +99,0 @@ if (transport === 'websocket' || transport === 'flashsocket') { |
{ | ||
"name": "karma-jasmine", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "A Karma plugin - adapter for Jasmine testing framework.", | ||
@@ -35,4 +35,5 @@ "main": "lib/index.js", | ||
"contributors": [ | ||
"Friedel Ziegelmayer <friedel.ziegelmayer@gmail.com>" | ||
"Friedel Ziegelmayer <friedel.ziegelmayer@gmail.com>", | ||
"Barry Fitzgerald <barfitzgerald@gmail.com>" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80877
2470