Interface Matchers

Index

Construct signatures

Properties

Methods

Construct signatures

constructor(env: Env, actual: any, spec: Env, isNot?: boolean): any

Parameters

  • env: Env
  • actual: any
  • spec: Env
  • isNot?: boolean optional

Returns

any

Properties

public Any: Any

public actual: any

public env: Env

optional public isNot?: boolean

public not: Matchers

public spec: Env

Methods

public message(): any

Returns

any

public toBe(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toBeArray(): boolean

Returns

boolean

public toBeCloseTo(expected: any, precision: any): boolean

Parameters

  • expected: any
  • precision: any

Returns

boolean

public toBeCloseToOneOf(values: Array<any>, isCloseToFunction: (actual: number, expected: number) => boolean): boolean

Parameters

  • values: Array<any>
  • isCloseToFunction: (actual: number, expected: number) => boolean

Returns

boolean

public toBeDefined(): boolean

Returns

boolean

public toBeFalsy(): boolean

Returns

boolean

public toBeGreaterThan(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toBeInRange(min: number, max: number): boolean

Parameters

  • min: number
  • max: number

Returns

boolean

public toBeInstanceOf(Constructor: Function): boolean

Parameters

  • Constructor: Function

Returns

boolean

public toBeLessThan(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toBeNaN(): boolean

Returns

boolean

public toBeNan(): boolean

Returns

boolean

public toBeNull(): boolean

Returns

boolean

public toBeNumber(): boolean

Returns

boolean

public toBeOfType(type: string): boolean

Parameters

  • type: string

Returns

boolean

public toBeOneOf(values: Array<any>): boolean

Parameters

  • values: Array<any>

Returns

boolean

public toBeTruthy(): boolean

Returns

boolean

public toBeUndefined(): boolean

Returns

boolean

public toContain(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toContainHtml(expected: string): boolean

Parameters

  • expected: string

Returns

boolean

public toContainOnce(value: any): boolean

Parameters

  • value: any

Returns

boolean

public toContainText(expected: string): boolean

Parameters

  • expected: string

Returns

boolean

public toEachEndWith(searchString: string): boolean

Parameters

  • searchString: string

Returns

boolean

public toEachStartWith(searchString: string): boolean

Parameters

  • searchString: string

Returns

boolean

public toEndWith(value: any): boolean

Parameters

  • value: any

Returns

boolean

public toEndWith(values: Array<any>): boolean

Parameters

  • values: Array<any>

Returns

boolean

public toEqual(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toExactlyHaveProperties(names?: Array<string>): boolean

Parameters

  • names?: Array<string> optional

Returns

boolean

public toHaveBeenCalled(): boolean

Returns

boolean

public toHaveBeenCalledWith(params?: Array<any>): boolean

Parameters

  • params?: Array<any> optional

Returns

boolean

public toHaveBeenCalledXTimes(count: number): boolean

Parameters

  • count: number

Returns

boolean

public toHaveLength(length: number): boolean

Parameters

  • length: number

Returns

boolean

public toHaveOwnProperties(names?: Array<string>): boolean

Parameters

  • names?: Array<string> optional

Returns

boolean

public toHaveOwnPropertiesWithValues(obj: Object): boolean

Parameters

  • obj: Object

Returns

boolean

public toHaveProperties(names?: Array<string>): boolean

Parameters

  • names?: Array<string> optional

Returns

boolean

public toHavePropertiesWithValues(obj: Object): boolean

Parameters

  • obj: Object

Returns

boolean

public toMatch(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toNotBe(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toNotContain(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toNotEqual(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toNotMatch(expected: any): boolean

Parameters

  • expected: any

Returns

boolean

public toSomeEndWith(searchString: string): boolean

Parameters

  • searchString: string

Returns

boolean

public toSomeStartWith(searchString: string): boolean

Parameters

  • searchString: string

Returns

boolean

public toStartWith(value: any): boolean

Parameters

  • value: any

Returns

boolean

public toStartWith(value: Array<any>): boolean

Parameters

  • value: Array<any>

Returns

boolean

public toStartWithEither(searchString?: Array<any>): boolean

Parameters

  • searchString?: Array<any> optional

Returns

boolean

public toThrow(expected?: any): boolean

Parameters

  • expected?: any optional

Returns

boolean

public toThrowError(expected?: any): boolean

Parameters

  • expected?: any optional

Returns

boolean

public toThrowInstanceOf(klass: Function): boolean

Parameters

  • klass: Function

Returns

boolean

public toThrowStartsWith(text: string): boolean

Parameters

  • text: string

Returns

boolean

public wasNotCalled(): boolean

Returns

boolean