Releases: NagRock/ts-mockito
Releases · NagRock/ts-mockito
Dependencies fix
Fixed #11
Reset functionality now resets also stubs, added resetCalls to only reset call counter
Fixed getter and setter code execution while mocking class (issue #9)
Fixed #9
Now code from getters and setters is not executed.
Functionality of stubbing getter or setter is not added in this release. It's just fixing code execution issue.
Added mock resetting functionality
Now we can reset mocks using reset(mock);
function.
Example:
let mockedFoo:Foo = mock(Foo);
let foo:Foo = instance(mockedFoo);
foo.getBar();
verify(mockedFoo.getBar()).once(); // getBar has been called once
reset(mockedFoo); // reset mock call counter
verify(mockedFoo.getBar()).never(); // getBar has not been called after reset
Captor class exported from ts-mocikto dts
v1.1.1 Captor exported from ts-mockito module