Merge pull request #4480 from Mischi/chai-as-promised_fulfilled

add fulfilled to chai-as-promise
This commit is contained in:
Horiuchi_H
2015-05-29 16:18:10 +09:00
2 changed files with 2 additions and 0 deletions
@@ -9,6 +9,7 @@ chai.use(chaiAsPromised);
var promise: any;
chai.expect(promise).to.eventually.equal(3);
chai.expect(promise).to.become(3);
chai.expect(promise).to.be.fulfilled;
chai.expect(promise).to.be.rejected;
chai.expect(promise).to.be.rejectedWith(Error);
chai.expect(promise).to.notify(() => console.log('done'));
+1
View File
@@ -14,6 +14,7 @@ declare module Chai {
interface Assertion {
become(expected: any): Assertion;
fulfilled: Assertion;
rejected: Assertion;
rejectedWith(expected: any): Assertion;
notify(fn: Function): Assertion;