hubot-mock-adapter-as-promised
A helper for hubot-mock-adapter with promise
Last updated 5 years ago by ikuo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-mock-adapter-as-promised 
SYNC missed versions from official npm registry.

hubot-mock-adapter-as-promised

npm version Build Status

A helper for hubot-mock-adapter with promise (bluebird).

Installation

Install with npm:

npm install -g coffee-script
npm install hubot-mock-adapter --save-dev
npm install hubot-mock-adapter-as-promised --save-dev

Example

./scripts/ping.coffee

module.exports = (robot) ->
  robot.respond /PING$/i, (msg) ->
    msg.send "PONG"

./test/ping_test.coffee

expect = require('chai').use(require('chai-as-promised')).expect
hubot = require('hubot-mock-adapter-as-promised')

describe 'ping', ->
  hubot.includeContext ->
    robot.loadFile(require('path').resolve('.', 'scripts'), 'ping.coffee')

  it 'responds PONG', ->
    expect(hubot.text('hubot ping'))
      .to.eventually.equal('PONG')

See more examples in ./example/test.

Current Tags

  • 1.2.2                                ...           latest (5 years ago)

11 Versions

  • 1.2.2                                ...           5 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.2                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |