# hubot-mock-adapter-helper

> A helper for hubot-mock-adapter

Latest version **0.0.1** (published 2014-10-28) · 0 weekly downloads

## Install

```sh
npm install hubot-mock-adapter-helper
pnpm add hubot-mock-adapter-helper
yarn add hubot-mock-adapter-helper
bun add hubot-mock-adapter-helper
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-10-28 |
| First published | 2014-10-28 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | sinsoku |
| Maintainers | sinsoku |

## Links

- npm: https://www.npmjs.com/package/hubot-mock-adapter-helper
- Repository: https://github.com/sinsoku/hubot-mock-adapter-helper
- Issues: https://github.com/sinsoku/hubot-mock-adapter-helper/issues
- npm.io page: https://npm.io/package/hubot-mock-adapter-helper

## Recent versions

- 0.0.1 (latest) — 2014-10-28

## README

# hubot-mock-adapter-helper

A helper for [hubot-mock-adapter](https://github.com/blalor/hubot-mock-adapter).

## Installation

Install with [npm](https://www.npmjs.org/):

    $ npm install hubot-mock-adapter-helper --save-dev

## Example

You can write the test code in this way.

```coffeescript
expect = require('chai').expect
helper = require 'hubot-mock-adapter-helper'

TextMessage = require('hubot/src/message').TextMessage

describe 'ping', ->
  {robot, user, adapter} = {}

  beforeEach (done) ->
    helper.setupRobot (ret) ->
      {robot, user, adapter} = ret
      done()

  afterEach ->
    robot.shutdown()

  it 'responds "PONG"', (done) ->
    adapter.on 'reply', (envelope, strings) ->
      expect(envelope.user.name).to.equal('mocha')
      expect(strings[0]).to.equal('PONG')
    , done

    adapter.receive(new TextMessage(user, 'hubot ping'))
```

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