Installation
npm install --save @types/expectations
Summary
This package contains type definitions for expectations (https://github.com/spmason/expectations).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/expectations.
index.d.ts
declare var expect: Expectations.IExpectations;
declare namespace Expectations {
interface IExpectations {
(value: any): Expect;
addAssertion(name: string, matcher: Function): void;
}
interface IAssertions {
pass(message?: string): any;
fail(message: string): any;
}
class Expect {
value: any;
assertions: IAssertions;
expr: any;
parent: Expect;
not: Expect;
constructor(value: any, assertions?: IAssertions, expr?: any, parent?: Expect);
generateMessage(value: any, expr: any, toDo: string, otherVal?: any): string;
toEqual(val: any): any;
toNotEqual(val: any): any;
toBe(val: any): any;
toBeTruthy(): any;
toBeFalsey(): any;
toBeFalsy(): any;
toBeGreaterThan(val: any): any;
toBeLessThan(val: any): any;
toContain(val: any): any;
toMatch(val: any): any;
toBeDefined(): any;
toBeUndefined(): any;
toBeNull(): any;
toThrow(): any;
pass(): any;
fail(why?: string, what?: any): any;
}
}
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: none
Credits
These definitions were written by vvakame.