Skip to content

Instantly share code, notes, and snippets.

View Nicolab's full-sized avatar
:octocat:

Nicolas Talle Nicolab

:octocat:
View GitHub Profile
// Example test that spies on SocketStream.publish.channel() calls
// Using Mocha to drive: http://visionmedia.github.com/mocha/
// sinon.js for stubs/mocks/spies: http://sinonjs.org
// should.js for assertions: https://github.com/visionmedia/should.js
var sinon = require('sinon')
, should = require('should')
, ss = require('socketstream').start();
describe("Spying on SocketStream for testing", function() {