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.
constructorCallsDefinition
get constructorCalls(): A[];
instances
Returns an array of class instance metadata objects containing all instances created from the spy class.
instancesDefinition
get instances(): Spy.ClsObj<C, A>[];
nrInstances
Returns the number of class instances created from the spy.
nrInstancesDefinition
get nrInstances(): number;
Methods
clearInstances
Empties the history of created spy class instances.
clearInstancesDefinition
clearInstances(): void;
resetAllStubs
Resets the current spy class constructor stub and all the instances method stubs.
resetAllStubsDefinition
resetAllStubs(): void;
resetConstructorStub
Resets the used constructor to the originally given constructor.
resetConstructorStubDefinition
resetConstructorStub(): void;