mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
This commit is contained in:
@@ -26,6 +26,7 @@ thenableNum = chai.expect(thenableNum).to.notify(() => console.log('done'));
|
||||
// BDD API (should)
|
||||
thenableNum = thenableNum.should.be.fulfilled;
|
||||
thenableNum = thenableNum.should.eventually.deep.equal(3);
|
||||
thenableNum = thenableNum.should.eventually.become(3);
|
||||
thenableNum = thenableNum.should.become(3);
|
||||
thenableNum = thenableNum.should.be.rejected;
|
||||
thenableNum = thenableNum.should.be.rejectedWith(Error);
|
||||
|
||||
5
types/chai-as-promised/index.d.ts
vendored
5
types/chai-as-promised/index.d.ts
vendored
@@ -3,6 +3,7 @@
|
||||
// Definitions by: jt000 <https://github.com/jt000>,
|
||||
// Yuki Kokubun <https://github.com/Kuniwak>,
|
||||
// Leonard Thieu <https://github.com/leonard-thieu>,
|
||||
// Mike Lazer-Walker <https://github.com/lazerwalker>,
|
||||
// Matt Bishop <https://github.com/mattbishop>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
@@ -28,14 +29,14 @@ declare namespace Chai {
|
||||
become(expected: any): PromisedAssertion;
|
||||
fulfilled: PromisedAssertion;
|
||||
rejected: PromisedAssertion;
|
||||
rejectedWith(expected: any, message?: string | RegExp): PromisedAssertion;
|
||||
rejectedWith: PromisedThrow;
|
||||
notify(fn: Function): PromisedAssertion;
|
||||
}
|
||||
|
||||
// Eventually does not have .then(), but PromisedAssertion have.
|
||||
interface Eventually extends PromisedLanguageChains, PromisedNumericComparison, PromisedTypeComparison {
|
||||
// From chai-as-promised
|
||||
become(expected: PromiseLike<any>): PromisedAssertion;
|
||||
become(expected: any): PromisedAssertion;
|
||||
fulfilled: PromisedAssertion;
|
||||
rejected: PromisedAssertion;
|
||||
rejectedWith: PromisedThrow;
|
||||
|
||||
Reference in New Issue
Block a user