Skip to content

Instantly share code, notes, and snippets.

@saschagehlich
Created July 10, 2013 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saschagehlich/9e3a7648afe5a77fd11e to your computer and use it in GitHub Desktop.
Save saschagehlich/9e3a7648afe5a77fd11e to your computer and use it in GitHub Desktop.
io = require "socket.io-client"
express = require "express"
before (done) ->
app = express()
server = app.listen 3434
require("socket.io").listen server
done()
describe "Backend Server", ->
it "should successfully connect to the socket.io server", (done) ->
socket = io.connect "http://localhost:3434", "force new connection": true
console.log "connecting..."
socket.on "connect", ->
console.log "connected"
done()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment