Class Expect

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(value: any, assertions?: IAssertions, expr?: any, parent?: Expect): Expect

Parameters

  • value: any
  • assertions?: IAssertions optional
  • expr?: any optional
  • parent?: Expect optional

Returns

Expect

Properties

public assertions: IAssertions

public expr: any

public not: Expect

public parent: Expect

public value: any

Methods

public fail(why?: string, what?: any): any

Parameters

  • why?: string optional
  • what?: any optional

Returns

any

public generateMessage(value: any, expr: any, toDo: string, otherVal?: any): string

Parameters

  • value: any
  • expr: any
  • toDo: string
  • otherVal?: any optional

Returns

string

public pass(): any

Returns

any

public toBe(val: any): any

Parameters

  • val: any

Returns

any

public toBeDefined(): any

Returns

any

public toBeFalsey(): any

Returns

any

public toBeFalsy(): any

Returns

any

public toBeGreaterThan(val: any): any

Parameters

  • val: any

Returns

any

public toBeLessThan(val: any): any

Parameters

  • val: any

Returns

any

public toBeNull(): any

Returns

any

public toBeTruthy(): any

Returns

any

public toBeUndefined(): any

Returns

any

public toContain(val: any): any

Parameters

  • val: any

Returns

any

public toEqual(val: any): any

Parameters

  • val: any

Returns

any

public toMatch(val: any): any

Parameters

  • val: any

Returns

any

public toNotEqual(val: any): any

Parameters

  • val: any

Returns

any

public toThrow(): any

Returns

any