Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dignifiedquire/karma-peer
Test p2p apps in multiple browsers with karma
https://github.com/dignifiedquire/karma-peer
Last synced: 18 days ago
JSON representation
Test p2p apps in multiple browsers with karma
- Host: GitHub
- URL: https://github.com/dignifiedquire/karma-peer
- Owner: dignifiedquire
- License: mit
- Created: 2016-02-12T18:19:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-02-24T15:06:25.000Z (over 8 years ago)
- Last Synced: 2024-10-07T20:56:57.317Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-peer-to-peer - karma-peer
- awesome-peer-to-peer - karma-peer
README
# karma-peer
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)[![Build Status](https://img.shields.io/travis/dignifiedquire/karma-peer/master.svg?style=flat-square)](https://travis-ci.org/dignifiedquire/karma-peer) [![Dependency Status](https://img.shields.io/david/dignifiedquire/karma-peer.svg?style=flat-square)](https://david-dm.org/dignifiedquire/karma-peer) [![devDependency Status](https://img.shields.io/david/dev/dignifiedquire/karma-peer.svg?style=flat-square)](https://david-dm.org/dignifiedquire/karma-peer#info=devDependencies)
> Test peer to peer communication between browsers using karma.
## API
There is an object `peer` exposed on `window` which gives you the following
* `peer.ready(cb)`: This should be run to ensure all browsers are in sync before each test is started.
* `peer.done`: This should be run after every test to clean up state.
* `peer.send(msg)`: This is used to send a message to all other browsers. `msg` is an object.
* `peer.socket`: The underlying socket.io socket.
* `peer.spawn(name)`: Spawn a new browser with `name`
* `peer.id(cb)`: Get the id of the current browser