npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

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

install

npm i mock-socket.io

Downloadsweekly downloads

24

version

1.1.0

license

VOL

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability