# mocha-promise

> Test internal promises in mocha

Latest version **1.0.1** (published 2016-04-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install mocha-promise
pnpm add mocha-promise
yarn add mocha-promise
bun add mocha-promise
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-04-24 |
| First published | 2016-04-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gopikrishna Sathyamurthy |
| Maintainers | gopikrishna19 |
| Keywords | mocha, internal, promise, test |

## Links

- npm: https://www.npmjs.com/package/mocha-promise
- Repository: https://github.com/my-js-ventures/mocha-internal-promise-test
- Homepage: https://github.com/my-js-ventures/mocha-internal-promise-test#readme
- Issues: https://github.com/my-js-ventures/mocha-internal-promise-test/issues
- npm.io page: https://npm.io/package/mocha-promise

## Dependencies (3)

- [code](https://npm.io/package/code.md) ^2.2.0
- [mocha](https://npm.io/package/mocha.md) ^2.4.5
- [sinon](https://npm.io/package/sinon.md) ^1.17.3

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-04-24
- 1.0.0 — 2016-04-24

## README

# Mocha Internal Promise Test

We all know the mocha supports testing promises by returning the promise from system under test to mocha.

```js
it('should', () => {
  return systemUnderTest()
    .then(() => assert())
});
```

What happens if the system doesn't return a promise but handles a promise internally which needs to be tested? Included in this repository is a small sample on how to do that.

### Usage

Clone or download the repo and run

```
npm i
npm test
```

##### Enjoy!

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