Socket
Socket
Sign inDemoInstall

mock-hubot

Package Overview
Dependencies
136
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mock-hubot

Hubot mock library made dead simple


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
3.77 MB
Created
Weekly downloads
 

Readme

Source

Mock-hubot

This is a simple wrapper library around hubot-mock-adapter.

###How to use $ npm install --save-dev mock-hubot

Assume we were to test this script.

humock = require 'mock-hubot'
helloScript = require './hello-script.coffee'
{expect} = require 'chai'

describe 'test', ->

    beforeEach (done) ->
      humock.start ->
        humock.learn helloScript
        done()

    afterEach (done) ->
      humock.shutdown -> done()

    it 'provides callback-based way of testing', (done) ->
      humock.test 'hello', (envelope, strings) ->
        expect(strings[0]).match /hello back/
        done()

    it 'provides promise-based way of testing', (done) ->
      humock.test('hello').then (response) ->
        expect(response.toString()).match /hello back/
        done()

Keywords

FAQs

Last updated on 30 Mar 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc