forgiven-promise

0.0.1 • Public • Published

forgiven-promise

Build Status Coverage Status

Forgiven extension for recording promises returned from setup steps

Usage

npm install --save-dev forgiven forgiven-mocha forgiven-promise
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

Readme

Keywords

none

Package Sidebar

Install

npm i forgiven-promise

Weekly Downloads

1

Version

0.0.1

License

ISC

Last publish

Collaborators

  • pghalliday