Created
June 2, 2012 17:57
-
-
Save yocontra/2859361 to your computer and use it in GitHub Desktop.
vein test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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