SpyClass

superSpy~ SpyClass

Intermediate class that is generated and injected into the hierarchy

Parent --> Child hierarchy

,making it:

Parent --> SpyClass --> Child

This allows the intermediate class to spy on calls to super() made by the child class.

Constructor

new SpyClass()

Source:

Members

(static) superSpy :function

Source:
Returns a reference to the spy method on the child's call to super(). The response is a reference to a sinon spy.
Type:
  • function

Methods

(static) restore()

Source:
Restores the relationship between parent and child, by removing this class from the hierarchy. i.e, the relationship goes from:

Parent --> SpyClass --> Child

to:

Parent --> Child