NagRock / ts-mockito

Mocking library for TypeScript
MIT License
978 stars 93 forks source link

Question: How to call original method on spy after interception #231

Open EvilBeaver opened 1 year ago

EvilBeaver commented 1 year ago
when(transportSpy.onServerMessage(anyOfClass(ServerMessage)))
  .thenCall((message: DebuggerMessage) => {
      receivedMessages.push(message);
  });

I'm intercepting call on class using spy. I want to original implementation being called after my spy is called. How to make this? In Java mockito we have thenCallRealMethod() but I can't find it in ts-mockito.