Skip to content

Releases: NagRock/ts-mockito

Dependencies fix

28 Feb 13:08
Compare
Choose a tag to compare

Reset functionality now resets also stubs, added resetCalls to only reset call counter

Fixed getter and setter code execution while mocking class (issue #9)

25 Jan 08:02
Compare
Choose a tag to compare

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

05 Jan 10:03
Compare
Choose a tag to compare

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

30 Dec 12:40
Compare
Choose a tag to compare
v1.1.1

Captor exported from ts-mockito module