# mock-socket.io

> Simple mock for socket.io, for testing!

Latest version **1.1.0** (published 2015-10-19) · VOL license · 0 weekly downloads

## Install

```sh
npm install mock-socket.io
pnpm add mock-socket.io
yarn add mock-socket.io
bun add mock-socket.io
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-10-19 |
| First published | 2014-12-29 |
| Weekly downloads | 0 |
| License | VOL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | ArtskydJ |
| Maintainers | artskydj |
| Keywords | mock, socket.io, socket, io |

## Links

- npm: https://www.npmjs.com/package/mock-socket.io
- Repository: https://github.com/ArtskydJ/mock-socket.io
- Issues: https://github.com/ArtskydJ/mock-socket.io/issues
- npm.io page: https://npm.io/package/mock-socket.io

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-10-19
- 1.0.0 — 2014-12-29

## README

mock-socket.io
==============

[![Build Status](https://travis-ci.org/ArtskydJ/mock-socket.io.svg?branch=master)](https://travis-ci.org/ArtskydJ/mock-socket.io)

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
```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
```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](http://veryopenlicense.com)

---
_Source: https://npm.io/package/mock-socket.io · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
