mock-socket.io

1.1.0 • Public • Published

mock-socket.io

Build Status

Simple mock for socket.io, for testing!

Only the basics of socket.io are supported. Rooms, namespaces, etc. are not supported. If you're using socket.io for a simple app, this is a nice drop-in replacement.

Issues and Pull Requests are welcome.

usage

server.js

var Server = require('mock-socket.io').Server
var io = new Server() //parameters will be ignored
 
//do stuff with `io`
 
module.exports = yourThing
module.exports.io = io

client.js

var Client = require('mock-socket.io').Client
var serverIo = require('./server.js').io //above
var io = new Client(serverIo)
//do stuff with `io`

license

VOL

Readme

Keywords

Package Sidebar

Install

npm i mock-socket.io

Weekly Downloads

12

Version

1.1.0

License

VOL

Last publish

Collaborators

  • artskydj