Permalink
Browse files

Make the tests pass

useSockJS was getting defined as false, and if you do
"useSockJS?" then it will be truthy.
  • Loading branch information...
wmertens committed Aug 14, 2012
1 parent 23ead4a commit 27c33748a92f139a4d2f49f37b85649cb48d85fa
Showing with 8 additions and 5 deletions.
  1. +1 −1 Cakefile
  2. +1 −1 src/client/index.coffee
  3. +2 −1 src/server/sockjs.coffee
  4. +1 −1 webclient/share.js
  5. +3 −1 webclient/share.uncompressed.js
View
@@ -10,7 +10,7 @@ process.env.PATH = "#{npm_bin}#{path_sep}#{process.env.PATH}"
task 'test', 'Run all tests', ->
# run directly to get all the delicious output
- console.log 'Running tests...'
+ console.log 'Running tests... (is your webclient up-to-date?)'
exec 'nodeunit tests.coffee', (err, stdout, stderr) ->
throw err if err
View
@@ -15,7 +15,7 @@ if WEB?
hasBCSocket = window.BCSocket isnt undefined
hasSockJS = window.SockJS isnt undefined
throw new Error 'Must load socks or browserchannel before this library' unless hasBCSocket or hasSockJS
- useSockJS = hasSockJS and !hasBCSocket
+ useSockJS = true if hasSockJS and !hasBCSocket
else
Connection = require('./connection').Connection
View
@@ -14,6 +14,7 @@ wrapSession = (conn) ->
exports.attach = (server, createAgent, options) ->
+ options.prefix or= "/sockjs"
sjsServer = sockjs.createServer options
sjsServer.on 'connection', (conn) -> sessionHandler wrapSession(conn), createAgent
- sjsServer.installHandlers server, {prefix: "/sockjs"}
+ sjsServer.installHandlers server
View

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 27c3374

Please sign in to comment.