You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mockito offers a convenient tool called ArgumentCaptor which is really useful for analyzing actual argument values - http://docs.mockito.googlecode.com/hg/org/mockito/ArgumentCaptor.html
I just noticed that JsMockito is missing this feature
Here is my implementation, I would be glad to make it part of JsMockito :)
varmockedFunction=JsMockito.mockFunction();varargsCaptor=newArgumentCaptor();JsMockito.verify(mockedFunction)(argsCaptor.capture());varinvocationArgs=argsCaptor.getValue();// verify invocationArgs here
The text was updated successfully, but these errors were encountered:
Hi,
Mockito offers a convenient tool called ArgumentCaptor which is really useful for analyzing actual argument values - http://docs.mockito.googlecode.com/hg/org/mockito/ArgumentCaptor.html
I just noticed that JsMockito is missing this feature
Here is my implementation, I would be glad to make it part of JsMockito :)
Here is an example usage:
The text was updated successfully, but these errors were encountered: