1.0.1 • Published 8 years ago

mocha-promise v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

Mocha Internal Promise Test

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

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!