# forgiven-promise

> Forgiven extension for recording promises returned from setup steps

Latest version **0.0.1** (published 2017-03-24) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-03-24 |
| First published | 2017-03-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Peter Halliday |
| Maintainers | pghalliday |

## Links

- npm: https://www.npmjs.com/package/forgiven-promise
- Repository: https://github.com/pghalliday/forgiven-promise
- Homepage: https://github.com/pghalliday/forgiven-promise#readme
- Issues: https://github.com/pghalliday/forgiven-promise/issues
- npm.io page: https://npm.io/package/forgiven-promise

## Recent versions

- 0.0.1 (latest) — 2017-03-24

## README

# forgiven-promise

[![Build Status](https://travis-ci.org/pghalliday/forgiven-promise.svg?branch=master)](https://travis-ci.org/pghalliday/forgiven-promise)
[![Coverage Status](https://coveralls.io/repos/github/pghalliday/forgiven-promise/badge.svg?branch=master)](https://coveralls.io/github/pghalliday/forgiven-promise?branch=master)

[Forgiven](https://github.com/pghalliday/forgiven) extension for recording promises returned from setup steps 

## Usage

```shell
npm install --save-dev forgiven forgiven-mocha forgiven-promise
```

```javascript
import {
  create,
} from 'forgiven';
import {
  mocha,
} from 'forgiven-mocha';
import {
  promise,
} from 'forgiven-promise';

global.given = create(mocha, {
  promise: promise,
});

const context = {};

given.a.promise.as(context, 'promise').from(() => Promise.reject(new Error('FAIL')))
.then(() => context.promise.should.be.rejectedWith('FAIL'))
.end();
```

## Contributing

Run unit tests and build before pushing/opening a pull request.

- `npm test` - lint and test
- `npm start` - watch and build, etc with alarmist
- `npm run build` - run tests then build
- `npm run watch` - watch for changes and run build
- `npm run ci` - run build and submit coverage to coveralls

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