Function: instance()
instance<
T>(mockedValue):T
Defined in: ts-mockito.ts:141
Gets the actual instance to use in the code under test, from a value created by mock or spy.
Type Parameters
T
T
Parameters
mockedValue
T
Returns
T
the instance object
Example
const mockedFoo = mock(Foo);
const foo = instance(mockedFoo);
foo.getBar(3); // calls through to the mock