Skip to content

Instantly share code, notes, and snippets.

@contra contra/gist:2859361
Created Jun 2, 2012

Embed
What would you like to do?
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
You can’t perform that action at this time.