mocha-promise

1.0.1 • Public • Published

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!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    6
  • 1.0.0
    1

Package Sidebar

Install

npm i mocha-promise

Weekly Downloads

2

Version

1.0.1

License

ISC

Last publish

Collaborators

  • gopikrishna19