UNPKG

typespec-bdd

Version:

BDD framework for TypeScript.

25 lines (24 loc) 1.29 kB
export interface IThrowsParameters { fn: () => void; message?: string; errorString?: string; } export declare class Assert { static areIdentical(expected: any, actual: any, message?: string): void; static areNotIdentical(expected: any, actual: any, message?: string): void; static areCollectionsIdentical(expected: any[], actual: any[], message?: string): void; static areCollectionsNotIdentical(expected: any[], actual: any[], message?: string): void; static isTrue(actual: boolean, message?: string): void; static isFalse(actual: boolean, message?: string): void; static isTruthy(actual: any, message?: string): void; static isFalsey(actual: any, message?: string): void; static isString(actual: any, message?: string): void; static isNumber(actual: any, message?: string): void; static isBoolean(actual: any, message?: string): void; static throws(params: IThrowsParameters): void; static throws(actual: () => void, message?: string): void; static doesNotThrow(actual: () => void, message?: string): void; static executesWithin(actual: () => void, timeLimit: number, message?: string): void; static fail(message?: string): void; private static getError(resultMessage, message?); }