Add to the chai Assert interface (#18835)

* Add to the chai Assert interface

* Fix one-line missing whitespace
This commit is contained in:
Shaun Luttin
2017-08-10 16:33:27 -07:00
committed by Mohamed Hegazy
parent bb4aa71df3
commit be920333eb
2 changed files with 13 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ declare global {
end(callback?: (err: any, res: Response) => void): FinishedRequest;
}
interface FinishedRequest<T = Response>{
interface FinishedRequest<T = Response> {
then<TR1 = T, TR2 = void>(success?: (res: T) => TR1 | PromiseLike<TR1>, failure?: (err: any) => TR2 | PromiseLike<TR2>): FinishedRequest<TR1>;
catch(failure?: (err: any) => void): FinishedRequest<T>;
}

12
types/chai/index.d.ts vendored
View File

@@ -1338,6 +1338,18 @@ declare namespace Chai {
*/
notFrozen<T>(object: T, message?: string): void;
/**
* Asserts that the target does not contain any values. For arrays and
* strings, it checks the length property. For Map and Set instances, it
* checks the size property. For non-function objects, it gets the count
* of own enumerable string keys.
*
* @type T Type of object
* @param object Actual value.
* @param message Message to display on error.
*/
isEmpty<T>(object: T, message?: string): void;
/**
* Asserts that the target contains values. For arrays and strings, it checks
* the length property. For Map and Set instances, it checks the size property.