0.0.1 • Published 6 years ago

bottender-context-simulator v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Bottender Context Simulator

License: MIT

Test your Bottender with ease

  • only support messenger platform

Installation

npm install --dev bottender-context-simulator --save

Example

Modify from the original example

const { ContextSimulator } = require('bottender-context-simulator');

const handler = require('../handler');

const simulator = new ContextSimulator({
  platform: 'messenger'
});

it('should work', async () => {
  const context = simulator.createQuickReplyContext('Awesome');

  await handler(context);

  expect(context.sendText).toBeCalledWith('You say: Awesome');
});