From 3afd16a3691da4a9be175374f127730fbf87dc7a Mon Sep 17 00:00:00 2001 From: Fabian Raetz Date: Fri, 29 May 2015 00:33:31 +0200 Subject: [PATCH 1/2] add test case for fulfilled --- chai-as-promised/chai-as-promised-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/chai-as-promised/chai-as-promised-tests.ts b/chai-as-promised/chai-as-promised-tests.ts index a2dcb72ed3..95a4335173 100644 --- a/chai-as-promised/chai-as-promised-tests.ts +++ b/chai-as-promised/chai-as-promised-tests.ts @@ -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')); From 5b0830b61e0cd5ba8dfe37bca50e47af2d3d1575 Mon Sep 17 00:00:00 2001 From: Fabian Raetz Date: Fri, 29 May 2015 00:34:31 +0200 Subject: [PATCH 2/2] add fulfilled to Assertion --- chai-as-promised/chai-as-promised.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/chai-as-promised/chai-as-promised.d.ts b/chai-as-promised/chai-as-promised.d.ts index 6ff150eb44..106bbf41e8 100644 --- a/chai-as-promised/chai-as-promised.d.ts +++ b/chai-as-promised/chai-as-promised.d.ts @@ -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;