mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Added support for Promise assertions to should
This commit is contained in:
9
types/should/index.d.ts
vendored
9
types/should/index.d.ts
vendored
@@ -42,6 +42,7 @@ interface ShouldAssertion {
|
||||
Class(): ShouldAssertion;
|
||||
Undefined(): ShouldAssertion;
|
||||
Null(): ShouldAssertion;
|
||||
Promise(): ShouldAssertion;
|
||||
generator(): ShouldAssertion;
|
||||
iterable(): ShouldAssertion;
|
||||
iterator(): ShouldAssertion;
|
||||
@@ -92,6 +93,14 @@ interface ShouldAssertion {
|
||||
endWith(expected: string, message?: any): ShouldAssertion;
|
||||
throw(message?: any): ShouldAssertion;
|
||||
|
||||
//promises
|
||||
eventually: ShouldAssertion;
|
||||
finally: ShouldAssertion;
|
||||
fulfilled(): Promise<any>;
|
||||
fulfilledWith(value: any): Promise<any>
|
||||
rejected(): Promise<any>;
|
||||
rejectedWith(err: Error | string | RegExp): Promise<any>;
|
||||
|
||||
//http
|
||||
header(field: string, val?: string): ShouldAssertion;
|
||||
status(code: number): ShouldAssertion;
|
||||
|
||||
Reference in New Issue
Block a user