ts-mockito icon indicating copy to clipboard operation
ts-mockito copied to clipboard

Johanblumenberg fnmock

Open LironHazan opened this issue 4 years ago • 4 comments
trafficstars

LironHazan avatar Sep 28 '21 08:09 LironHazan

@cspotcode I want to merge this PR, wdyt?

LironHazan avatar Aug 01 '22 05:08 LironHazan

@johanblumenberg on another topic :) I really liked that implementation, do you think it's enough to be ported or are there any other functionalities in scope of mocking single fns you've added worth grabbing?

LironHazan avatar Aug 01 '22 13:08 LironHazan

@LironHazan go for it. I won't have much time for ts-mockito so I probably won't be able to do code review, so I say go for it with whatever you have planned.

cspotcode avatar Aug 01 '22 13:08 cspotcode

I think that this can be easily achieved with spies, instead of creating a new interface:

const CallbackSpy = spy({ callback: () => 'foobar' });

expect(CallbackSpy.callback()).toHaveBeenCalled()

roypeled avatar Jul 14 '24 13:07 roypeled