# botbuilder-calling-test

> Testing utilities for botbuilder-calling

Latest version **1.0.8** (published 2017-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install botbuilder-calling-test
pnpm add botbuilder-calling-test
yarn add botbuilder-calling-test
bun add botbuilder-calling-test
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2017-05-03 |
| First published | 2017-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | chstone@microsoft.com |
| Maintainers | ctstone |

## Links

- npm: https://www.npmjs.com/package/botbuilder-calling-test
- Repository: https://github.com/ctstone/botbuilder-calling-test
- Homepage: https://github.com/ctstone/botbuilder-calling-test#readme
- Issues: https://github.com/ctstone/botbuilder-calling-test/issues
- npm.io page: https://npm.io/package/botbuilder-calling-test

## Dependencies (1)

- [async](https://npm.io/package/async.md) ^2.3.0

## Recent versions

- 1.0.8 (latest) — 2017-05-03
- 1.0.7 — 2017-05-03
- 1.0.6 — 2017-05-03
- 1.0.5 — 2017-04-20

## README

# Installation
```
npm install --save botbuilder-calling-test
```

# Usage

## Capture testable events from your bot

```TypeScript
import { BotCallRecorder } from 'botbuilder-calling-test';
import { UniversalCallBot } from 'botbuilder-calling';

// your call bot
const bot = new UniversalCallBot(/* params */);

// store audio and events at 'logs'
const recorder = new BotCallRecorder({rootDir:'logs'});

// use recorder with your bot
bot.use(recorder.middleware);

/** run your bot to capture a testable scenario **/
```


## Write tests
```TypeScript
import { MockCallConnector } from 'botbuilder-calling-test';

// use nock or other utility to mock responses from Bing Speech and LUIS, if necessary

// read events from captured data
const mockCallConnector = new MockCallConnector({rootDir:'logs'});

mockCallConnector.requestFromFiles([
  'request1.json',
  'request2.json',
], (err, [
  workflow1,
  workflow2,
]) => {
  expect(workflow1.actions[0].action).toBe('answer');
  expect(workflow2.actions[0].playPrompt.prompts[0].value).toBe('some prompt');
});
```

---
_Source: https://npm.io/package/botbuilder-calling-test · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
