interface Spy.ClsMeta<C,A>
The metadata object type for a spied class.
Type parameters
Name | Constraints | Description |
---|---|---|
C | the class type | |
A | any[] | the class constructor parameter array type |
Properties
constructorCalls
Returns an array of received constructor call parameters.
constructorCalls
Definition
get constructorCalls(): A[];
instances
Returns an array of class instance metadata objects containing all instances created from the spy class.
instances
Definition
get instances():
Spy.ClsObj
<C, A>[];
nrInstances
Returns the number of class instances created from the spy.
nrInstances
Definition
get nrInstances(): number;
Methods
clearInstances
Empties the history of created spy class instances.
clearInstances
Definition
clearInstances(): void;
resetAllStubs
Resets the current spy class constructor stub and all the instances method stubs.
resetAllStubs
Definition
resetAllStubs(): void;
resetConstructorStub
Resets the used constructor to the originally given constructor.
resetConstructorStub
Definition
resetConstructorStub(): void;