Class Gently

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(): Gently

Returns

Gently

Properties

public hijacked: Array<any>

Methods

public expect(obj: any, method: string, stubFn?: (...args: any[]) => any): (...args: any[]) => any

Parameters

  • obj: any
  • method: string
  • stubFn?: (...args: any[]) => any optional

Returns

(...args: any[]) => any

public expect(obj: any, method: string, count: number, stubFn: (...args: any[]) => any): (...args: any[]) => any

Parameters

  • obj: any
  • method: string
  • count: number
  • stubFn: (...args: any[]) => any

Returns

(...args: any[]) => any

public hijack(realRequire: (id: string) => any): (id: string) => any

Parameters

  • realRequire: (id: string) => any

Returns

(id: string) => any

public restore(obj: any, method: string)

Parameters

  • obj: any
  • method: string

public stub(location: string, exportsName?: string): any

Parameters

  • location: string
  • exportsName?: string optional

Returns

any

public verify(msg?: string)

Parameters

  • msg?: string optional