@types/expectations
TypeScript icon, indicating that this package has built-in type declarations

0.2.32 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/expectations

Weekly Downloads

20

Version

0.2.32

License

MIT

Unpacked Size

4.83 kB

Total Files

5

Last publish

Collaborators

  • types