Skip to content

Commit

Permalink
Test to verify that WebSockets work with JSONP forced by the JS client
Browse files Browse the repository at this point in the history
  • Loading branch information
halter73 committed Dec 31, 2013
1 parent 219a089 commit 5a8e1a3
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ QUnit.asyncTimeoutTest("Hub invocations fail when the WebSocket in in an invalid
});
});

// Cleanup
return function () {
connection.stop();
};
});

QUnit.asyncTimeoutTest("WebSocket transport functions with JSONP enabled.", testUtilities.defaultTestTimeout, function (end, assert, testName) {
var connection = testUtilities.createHubConnection(end, assert, testName, 'jsonp/signalr'),
demo = connection.createHubProxies().demo,
echoNum = 73;

connection.start({ transport: "webSockets", jsonp: true }).done(function () {
demo.server.overload(echoNum).done(function (result) {
assert.equal(result, echoNum, "Received invocation result");
end();
});
});

// Cleanup
return function () {
connection.stop();
Expand Down

0 comments on commit 5a8e1a3

Please sign in to comment.