0.0.1 • Published 7 years ago

forgiven-promise v0.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

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
0.0.1

7 years ago