1.0.2 • Published 9 years ago

expect-to-be-a-promise v1.0.2

Weekly downloads
157
License
MIT
Repository
github
Last release
9 years ago

expect-to-be-a-promise

A chai matcher to assert the return value of a function is a thenable.

Usage

var chai = require('chai');
var expectToBeAPromise = require('expect-to-be-a-promise');

chai.use(expectToBeAPromise);

function doThing() {
  return new Promise(function(resolve, reject) {
    resolve('some value');
  });
}

it('is a promise', function() {
  expect(doThing()).to.be.a.promise;
});
1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago