Skip to content

Instantly share code, notes, and snippets.

@yocontra
Created June 2, 2012 17:57
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 yocontra/2859361 to your computer and use it in GitHub Desktop.
Save yocontra/2859361 to your computer and use it in GitHub Desktop.
vein test
require 'should'
http = require 'http'
Vein = require 'vein'
port = Math.floor(Math.random() * 1000) + 8000
server = new Vein http.createServer().listen port
describe 'first test', (done)->
it 'should do stuff', (done)->
server.drop()
server.stack = []
client1 = new Vein.Client port: port, transports: ['websocket']
client1.ready (services)->
console.log "first test's client.ready was called"
client1.disconnect()
done()
describe 'second test', (done)->
it 'should do stuff', (done)->
server.drop()
server.stack = []
client2 = new Vein.Client port: port, transports: ['websocket']
client2.ready (services)->
client2.disconnect()
done()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment